From c6168eae451f191f848098a81478a60904a92f94 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Thu, 22 Nov 2018 11:31:08 +0100 Subject: [PATCH] [boursorama] Corrected URLs for Loans Loans are fetched on a loan detail page and the correponding account is removed from the accounts_list, however it is crucial to add the loan url for other methods in the module such as iter_transfer_recipients that start with "assert account.url" and get_invest that starts with "if /blabla/ in account.url". Closes: 28577@sibi --- modules/boursorama/browser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index a850127f3d..c0b9dd0564 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -228,8 +228,12 @@ def get_accounts_list(self): if account.type == Account.TYPE_CARD and account.url not in valid_card_url: self.accounts_list.remove(account) elif account.type == Account.TYPE_LOAN: + # Loans details are present on another page so we create + # a Loan object and remove the corresponding Account: self.location(account.url) - self.loans_list.append(self.page.get_loan()) + loan = self.page.get_loan() + loan.url = account.url + self.loans_list.append(loan) self.accounts_list.remove(account) self.accounts_list.extend(self.loans_list) -- GitLab