diff --git a/modules/cragr/api/pages.py b/modules/cragr/api/pages.py index 27cb8fd4ecd73a929f9371b2a6dd3b2e1219edfe..637277e245475f17d6f64b7c6c8fbcdb9ff90001 100644 --- a/modules/cragr/api/pages.py +++ b/modules/cragr/api/pages.py @@ -227,8 +227,8 @@ class item(ItemElement): klass = Account def obj_id(self): - # Loan ids may be duplicated so we use the contract number for now: - if Field('type')(self) == Account.TYPE_LOAN: + # Loan/credit ids may be duplicated so we use the contract number for now: + if Field('type')(self) in (Account.TYPE_LOAN, Account.TYPE_CONSUMER_CREDIT): return CleanText(Dict('idElementContrat'))(self) return CleanText(Dict('numeroCompte'))(self)