Commit 170e49b2 authored by Martin Lavoie's avatar Martin Lavoie Committed by Vincent A

[fortuneo] Sometime there is no account in the transfert page

We go on this page to retrieve the tpp_id.
parent 20145176
......@@ -294,6 +294,12 @@ def iter_accounts(self):
self.register_transfer.go(ca=account._ca)
self.page.fill_tpp_account_id(obj=account)
if not account._tpp_id:
self.logger.warning(
'Could not find the tpp_id of account %s',
account.id
)
yield account
@need_login
......
......@@ -186,7 +186,8 @@ class fill_tpp_account_id(ItemElement):
def obj__tpp_id(self):
accounts_list = Regexp(
CleanText('//script[contains(text(), "listeComptesADebiter")]'),
r'listeComptesADebiter = (.*}]); var listeComptesACrediter'
r'listeComptesADebiter = (.*}]); var listeComptesACrediter',
default='[]'
)(self)
accounts_list = json.loads(accounts_list)
for account in accounts_list:
......
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