From 200516b03b13d6d916b084a2cd864b20e7f9ce23 Mon Sep 17 00:00:00 2001 From: Florent Viard Date: Fri, 9 Apr 2021 00:02:56 +0200 Subject: [PATCH] [creditmutuel] fixes get_iban_document not working for some accounts To find the iban document line in the table, we compare the line content with the label. But for some accounts, the account title in the line will be uppercase, but not for all of them. --- modules/creditmutuel/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 936a4b8dd4..0e1aadf600 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -1786,7 +1786,7 @@ def fill_iban(self, accounts): def get_iban_document(self, subscription): for raw in self.doc.xpath('//table[has-class("liste")]//tbody//tr[not(@class)]'): - if raw.xpath('.//td[1]')[0].text_content().startswith(subscription.label.upper()): + if raw.xpath('.//td[1]')[0].text_content().upper().startswith(subscription.label.upper()): iban_document = Document() iban_document.label = 'IBAN {}'.format(subscription.label) iban_document.url = Link(raw.xpath('.//a'))(self.doc) -- GitLab