Commit e952656d authored by Damien Mat's avatar Damien Mat Committed by hydrargyrum
Browse files

[bred] add AccountNotFound in iter_transfer_recipients

This would cause an issue when getting an
account from openapi but that doesn't exist
in directaccess.
parent 8ac51eae
......@@ -96,10 +96,10 @@ def fill_account(self, account, fields):
def iter_transfer_recipients(self, account):
if not isinstance(account, Account):
account = find_object(self.iter_accounts(), id=account)
account = find_object(self.iter_accounts(), id=account, error=AccountNotFound)
elif not hasattr(account, '_univers'):
# We need a Bred filled Account to know the "univers" associated with the account
account = find_object(self.iter_accounts(), id=account.id)
account = find_object(self.iter_accounts(), id=account.id, error=AccountNotFound)
return self.browser.iter_transfer_recipients(account)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment