["LoanStatus"]
This commit is contained in:
@@ -51,8 +51,8 @@ class Repayment(db.Model):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def create_repayment(cls, repayment_data):
|
def create_repayment(cls, repayment_data):
|
||||||
logger.info(f"create_repayment data: {repayment_data}")
|
logger.info(f"create_repayment data: {repayment_data}")
|
||||||
if repayment_data.LoanStatus not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]:
|
if repayment_data["LoanStatus"] not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]:
|
||||||
raise ValueError(f"Repayment cannot be processed. Loan status: ({repayment_data.LoanStatus})")
|
raise ValueError(f"Repayment cannot be processed. Loan status: ({repayment_data["LoanStatus"]})")
|
||||||
|
|
||||||
repayment = cls(
|
repayment = cls(
|
||||||
customer_id=repayment_data.customerId,
|
customer_id=repayment_data.customerId,
|
||||||
|
|||||||
Reference in New Issue
Block a user