do not try to get IBAN from life insurance accounts
This commit is contained in:
parent
b0943a943b
commit
e4b80bda90
1 changed files with 10 additions and 4 deletions
|
|
@ -30,7 +30,8 @@ class AccountsList(Page):
|
|||
1: Account.TYPE_CHECKING,
|
||||
2: Account.TYPE_SAVINGS,
|
||||
3: Account.TYPE_DEPOSIT,
|
||||
5: Account.TYPE_MARKET, # FIX ME : I don't know the right code
|
||||
5: Account.TYPE_LIFE_INSURANCE,
|
||||
8: Account.TYPE_LOAN,
|
||||
9: Account.TYPE_LOAN,
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +52,7 @@ class AccountsList(Page):
|
|||
account.balance = Decimal(str(compte['soldeDispo']))
|
||||
account.coming = Decimal(str(compte['soldeAVenir']))
|
||||
account.type = self.ACCOUNT_TYPES.get(id_famille, Account.TYPE_UNKNOWN)
|
||||
account.id = 0
|
||||
account.id = None
|
||||
account._link_id = 'KEY'+compte['key']
|
||||
|
||||
# IBAN aren't in JSON
|
||||
|
|
@ -60,8 +61,13 @@ class AccountsList(Page):
|
|||
if a.label == account.label:
|
||||
account.id = i
|
||||
# But it's doesn't work with LOAN and MARKET, so use slow method : Get it from transaction page.
|
||||
if account.id == 0:
|
||||
account.id = self.browser.get_IBAN_from_account(account)
|
||||
if account.id is None:
|
||||
if account.type != Account.TYPE_LIFE_INSURANCE:
|
||||
self.logger.debug('Get IBAN for account %s', account.label)
|
||||
account.id = self.browser.get_IBAN_from_account(account)
|
||||
else:
|
||||
account.id = compte['value']
|
||||
|
||||
l.append(account)
|
||||
|
||||
if len(l) == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue