From 306221f502727aa699359422c7dd54679569de44 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 20 Jun 2025 21:27:53 -0400 Subject: [PATCH] repayment_data.LoanStatus --- app/models/repayment.py | 4 ++-- app/routes/autocall.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/repayment.py b/app/models/repayment.py index 933a290..138f86a 100644 --- a/app/models/repayment.py +++ b/app/models/repayment.py @@ -51,8 +51,8 @@ class Repayment(db.Model): @classmethod def create_repayment(cls, repayment_data): - if loan.status not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]: - raise ValueError(f"Repayment cannot be processed. Loan status: ({loan.status})") + if repayment_data.LoanStatus not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]: + raise ValueError(f"Repayment cannot be processed. Loan status: ({repayment_data.LoanStatus})") repayment = cls( customer_id=repayment_data.customerId, diff --git a/app/routes/autocall.py b/app/routes/autocall.py index 155e940..e39b862 100644 --- a/app/routes/autocall.py +++ b/app/routes/autocall.py @@ -176,6 +176,7 @@ def salary_detect(): "transactionId": loan.transaction_id, "initiatedBy": "SALARY_DETECT", "salaryAmount": pending_salary.amount, + "LoanStatus": loan.status, } # repayment_data = {