Commit b50f9c69 authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by Vincent A

[bred] Handle error code for non-owner of account while fetch recipients

When the user is not owner of an account, we have an error code while
trying to fetch the recipients of the account.
parent 54c2d50e
......@@ -53,6 +53,15 @@ class AuthentResultPage(LoggedPage, JsonPage):
class EmittersListPage(LoggedPage, JsonPage):
def can_account_emit_transfer(self, account_id):
code = Dict('erreur/code')(self.doc)
if code == '90624':
# Not the owner of the account:
# Nous vous précisons que votre pouvoir ne vous permet pas
# d'effectuer des virements de ce type au débit du compte sélectionné.
return False
elif code != '0':
raise AssertionError('Unhandled code %s in transfer emitter selection' % code)
for obj in Dict('content')(self.doc):
for account in Dict('postes')(obj):
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