diff --git a/modules/cragr/api/browser.py b/modules/cragr/api/browser.py index 04db2cca40be4544f3caa7fc5736d42a08cde569..11f4a2fa516606a8140e5dd8b5ac07d32bde3494 100644 --- a/modules/cragr/api/browser.py +++ b/modules/cragr/api/browser.py @@ -202,9 +202,19 @@ def get_accounts_list(self): account._contract = contract account.owner_type = self.page.get_owner_type() - # Some accounts have no balance in the main JSON, so we must get all - # the (_id_element_contrat, balance) pairs in the account_details JSON: - categories = {int(account._category) for account in accounts_list if account._category != None} + ''' Other accounts have no balance in the main JSON, so we must get all + the (_id_element_contrat, balance) pairs in the account_details JSON. + + Account categories always correspond to the same account types: + # Category 1: Checking accounts, + # Category 2: To be determined, + # Category 3: Savings, + # Category 4: Loans & Credits, + # Category 5: Insurances (skipped), + # Category 6: To be determined, + # Category 7: Market accounts. ''' + + categories = {int(account._category) for account in accounts_list if account._category not in (None, '5')} account_balances = {} loan_ids = {} for category in categories: