[update]: loan status response

This commit was merged in pull request #37.
This commit is contained in:
VivianDee
2025-05-27 02:02:22 +01:00
parent 7a2ff6586f
commit 65472d3f07
7 changed files with 51 additions and 5 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ class Repayment(db.Model):
loan = Loan.get_customer_loan(loan_id = loan_id, customer_id = customer_id)
# Check that the loan is active
if loan.status != LoanStatus.ACTIVE:
if loan.status not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]:
raise ValueError(f"Repayment cannot be processed. Loan status: ({loan.status})")