Commit 9ecf0441 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[cragr] Remove assert on account balances

Sometimes the JSON does not contain any account balance, or there is no
balance at all, and this assert crashes the whole connection because of this.
Without the assert, if we could not find the account balance, it will just
return NotAvailable instead of keeping the connection in bug.
parent b4ca104a
......@@ -245,7 +245,8 @@ class AccountDetailsPage(LoggedPage, JsonPage):
if el.get('typeProduit') == 'assurance':
value = el.get('solde', el.get('encoursActuel', el.get('valorisationContrat', el.get('montantRestantDu', el.get('capitalDisponible')))))
assert value is not None, 'Could not find the account balance'
if value is None:
account_balances[Dict('idElementContrat')(el)] = float_to_decimal(value)
return account_balances
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