Commit f5ff2c4f authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by ntome

[bnporc] Fix bug when loans data is empty

Closes: 45456@sibi
parent 05f69277
......@@ -386,6 +386,11 @@ class AccountsPage(BNPPage):
class LoanDetailsPage(BNPPage):
@method
class fill_loan_details(ItemElement):
def condition(self):
# If the loan doesn't have any info (that means the loan is already refund),
# the data/message is null whereas it is set to "OK" when everything is fine.
return Dict('data/message')(self) == 'OK'
obj_total_amount = Dict('data/montantPret')
obj_maturity_date = Date(Dict('data/dateEcheanceRemboursement'), dayfirst=True)
obj_duration = Dict('data/dureeRemboursement')
......
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