account.id is now only paramNumCompte if there is not paramNumContrat
This commit is contained in:
parent
5900f12dfd
commit
910b54aff7
1 changed files with 4 additions and 2 deletions
|
|
@ -151,8 +151,10 @@ class AccountsPage(BasePage):
|
|||
label = 'Unable to determine'
|
||||
self.logger.warning('Unable to get account ID for %r' % label)
|
||||
continue
|
||||
|
||||
account.id = args['paramNumCompte'] + args['paramNumContrat']
|
||||
try:
|
||||
account.id = args['paramNumCompte'] + args['paramNumContrat']
|
||||
except KeyError:
|
||||
account.id = args['paramNumCompte']
|
||||
account_type_str = table.attrib['class'].split(' ')[-1][len('tableaux-comptes-'):]
|
||||
account.type = self.ACCOUNT_TYPES.get(account_type_str, Account.TYPE_UNKNOWN)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue