diff --git a/modules/cragr/api/pages.py b/modules/cragr/api/pages.py index 120a032ad1ac5aca309c2e494fafac3c8d759ad9..5b323680a78c364252043ccf12e6280765201185 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))