From 8d8b559412087e1f15b7878bdfb5b37f72111606 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Wed, 30 Jan 2019 11:20:31 +0100 Subject: [PATCH] [cragr] Skip account typing warning for "assurances" --- modules/cragr/api/pages.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/cragr/api/pages.py b/modules/cragr/api/pages.py index 120a032ad1..5b323680a7 100644 --- a/modules/cragr/api/pages.py +++ b/modules/cragr/api/pages.py @@ -207,6 +207,9 @@ def obj_id(self): obj__fam_contract_code = CleanText(Dict('codeFamilleContratBam')) def obj_type(self): + if CleanText(Dict('libelleUsuelProduit'))(self) in ('HABITATION',): + # No need to log warning for "assurance" accounts + return NotAvailable _type = Map(CleanText(Dict('libelleUsuelProduit')), ACCOUNT_TYPES, Account.TYPE_UNKNOWN)(self) if _type == Account.TYPE_UNKNOWN: self.logger.warning('There is an untyped account: please add "%s" to ACCOUNT_TYPES.' % CleanText(Dict('libelleUsuelProduit'))(self)) -- GitLab