Commit c3d10d04 authored by Christophe Francois's avatar Christophe Francois Committed by Vincent A

[axabanque] Filter out closed wealth accounts

These accounts have no balance, we don't want to fetch them.
parent 474e3b0f
......@@ -49,6 +49,10 @@ class AccountsPage(LoggedPage, HTMLPage):
class iter_accounts(ListElement):
item_xpath = '//div[contains(@data-module-open-link--link, "/savings/")]'
def condition(self):
# Filter out closed accounts
return CleanDecimal.French('.//p[has-class("amount-card")]', default=None)(self) is not None
class item(ItemElement):
klass = Account
......@@ -65,7 +69,7 @@ class AccountsPage(LoggedPage, HTMLPage):
obj_id = Regexp(CleanText('.//span[has-class("small-title")]'), r'([\d/]+)')
obj_number = obj_id
obj_label = CleanText('.//h3[has-class("card-title")]')
obj_balance = CleanDecimal.French('.//p[has-class("amount-card")]')
obj_balance = CleanDecimal.French('.//p[has-class("amount-card")]', default=None)
obj_valuation_diff = CleanDecimal.French('.//p[@class="performance"]', default=NotAvailable)
obj_currency = Currency('.//p[has-class("amount-card")]')
obj__acctype = "investment"
......
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