diff --git a/modules/bnporc/pp/pages.py b/modules/bnporc/pp/pages.py index 1ca5e37b41eb6fceb71677f6003c653a729c64c5..c642ac8b2ef2f80253044bcce68ebf8f36428ce2 100644 --- a/modules/bnporc/pp/pages.py +++ b/modules/bnporc/pp/pages.py @@ -315,6 +315,12 @@ class iter_accounts_details(DictElement): item_xpath = 'compte' class item(ItemElement): + def validate(self, obj): + # We skip loans with a balance of 0 because the JSON returned gives + # us no info (only `null` values on all fields), so there is nothing + # useful to display + return obj.type != Account.TYPE_LOAN or obj.balance != 0 + FAMILY_TO_TYPE = { 1: Account.TYPE_CHECKING, 2: Account.TYPE_SAVINGS,