handling duplicate id for account using Jsp Id

This commit is contained in:
Vincent Paredes 2015-08-11 14:14:42 +02:00 committed by Romain Bignon
commit 92168fe69a

View file

@ -165,6 +165,9 @@ class AccountsPage(BasePage):
card_id = re.search('(\d+)', box.xpath('./td[2]')[0].text.strip()) card_id = re.search('(\d+)', box.xpath('./td[2]')[0].text.strip())
if card_id: if card_id:
account.id += card_id.group(1) account.id += card_id.group(1)
if 'Valorisation' in account.label or u'Liquidités' in account.label:
account.id += args['idPanorama:_idcl'].split('Jsp')[-1]
except KeyError: except KeyError:
account.id = args['paramNumCompte'] account.id = args['paramNumCompte']
account_type_str = table.attrib['class'].split(' ')[-1][len('tableaux-comptes-'):] account_type_str = table.attrib['class'].split(' ')[-1][len('tableaux-comptes-'):]