Commit 4fdc6869 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[bp] add loan currency

parent e7405716
...@@ -234,14 +234,17 @@ class BPBrowser(LoginBrowser, StatesMixin): ...@@ -234,14 +234,17 @@ class BPBrowser(LoginBrowser, StatesMixin):
self.location(account.url) self.location(account.url)
if 'CreditRenouvelable' not in account.url: if 'CreditRenouvelable' not in account.url:
for loan in self.page.iter_loans(): for loan in self.page.iter_loans():
loan.currency = account.currency
accounts.append(loan) accounts.append(loan)
student_loan = self.page.get_student_loan() student_loan = self.page.get_student_loan()
if student_loan: if student_loan:
# Number of headers and item elements are the same # Number of headers and item elements are the same
assert len(student_loan._heads) == len(student_loan._items) assert len(student_loan._heads) == len(student_loan._items)
student_loan.currency = account.currency
accounts.append(student_loan) accounts.append(student_loan)
else: else:
for loan in self.page.iter_revolving_loans(): for loan in self.page.iter_revolving_loans():
loan.currency = account.currency
accounts.append(loan) accounts.append(loan)
else: else:
accounts.append(account) accounts.append(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