Commit 62b7fbae authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Romain Bignon

[creditmutuel] Fix cards list

In this space, if several cards are present in the drop-down menu, the
skip precendtly present skiped all the cards into the menu. Continue allows to
continue the iteration of other cards.

Closes: 9063@zendesk
parent 6dd02dae
......@@ -302,10 +302,8 @@ class item_account_generic(ItemElement):
card_xpath = multiple_cards_xpath + ' | ' + single_card_xpath
for elem in page.doc.xpath(card_xpath):
card_id = Regexp(CleanText('.', symbols=' '), r'([\dx]{16})')(elem)
if card_id in self.page.browser.unavailablecards or card_id in [d.id for d in self.page.browser.cards_list]:
raise SkipItem()
if any(card_id in a.id for a in page.browser.accounts_list):
is_in_accounts = any(card_id in a.id for a in page.browser.accounts_list)
if card_id in self.page.browser.unavailablecards or is_in_accounts:
continue
card = Account()
......
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