From f4bf0d6d11c25747244ab84733a66af2f72efd58 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Wed, 30 Jan 2019 11:40:36 +0100 Subject: [PATCH] [cragr] Added information about account categories & skipped assurances --- modules/cragr/api/browser.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/cragr/api/browser.py b/modules/cragr/api/browser.py index 04db2cca40..11f4a2fa51 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: -- GitLab