Commit aa7344b3 authored by Jerome Berthier's avatar Jerome Berthier Committed by Romain Bignon

[cragr] Fix duplicated accounts id when there are consumer credits

Like for the loans, the attribute numeroCompte refers to the main account, so we use the contract id as the account id.
parent 594e06bb
......@@ -227,8 +227,8 @@ class AccountsPage(LoggedPage, JsonPage):
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment