Commit 618aeae7 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Vincent A

[caissedepargne] Skip inaccessible accounts

These accounts are not accessible and navigation is broken here. The
solution here is to do login again and skip them.
parent e8e03c49
......@@ -651,7 +651,17 @@ def _add_account(self, accounts, link, label, account_type, balance, number=None
if account.type in (Account.TYPE_LIFE_INSURANCE, Account.TYPE_PERP):
account.ownership = AccountOwnership.OWNER
balance = balance or self.get_balance(account)
if not balance:
balance = self.get_balance(account)
except BrowserUnavailable as e:
if 'erreur_technique' in e.response.url:
# Details account are not accessible and navigation is broken here
# This account must be skipped
self.logger.warning('Could not access to %s details: we skip it', account.label)
if not empty(balance):
account.balance = Decimal(FrenchTransaction.clean_amount(balance))
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