From eae8e84fab203c369d432ba7ad862149b997042e Mon Sep 17 00:00:00 2001 From: Chinenye Nmoh Date: Mon, 3 Nov 2025 14:06:32 +0100 Subject: [PATCH] removed collected amount check --- app/models/loan.py | 4 ++-- app/utils/auth.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/loan.py b/app/models/loan.py index b352810..6de6ffe 100644 --- a/app/models/loan.py +++ b/app/models/loan.py @@ -341,8 +341,8 @@ class Loan(db.Model): balance = Decimal(str(loan.balance or 0)).quantize(Decimal("0.01"), rounding=ROUND_HALF_UP) # Ensure valid repayment amount - if amount_collected <= Decimal("0.00"): - raise ValueError("Repayment amount must be greater than zero.") + # if amount_collected <= Decimal("0.00"): + # raise ValueError("Repayment amount must be greater than zero.") if balance <= Decimal("0.00"): raise ValueError("There is no balance for this loan.") if amount_collected > balance: diff --git a/app/utils/auth.py b/app/utils/auth.py index 34ed4fd..2b7769e 100644 --- a/app/utils/auth.py +++ b/app/utils/auth.py @@ -16,7 +16,6 @@ def get_headers(): "password": "G7$k9@pL2!qR" } logger.info(f"Calling Bank Call-Auth Endpoint: {url}") - logger.info(f"Calling Bank Call-Auth Endpoint with data: {data}") headers = {"Content-Type": "application/json"} @@ -25,7 +24,6 @@ def get_headers(): response.raise_for_status() # Raises HTTPError for 4xx/5xx result = response.json() - logger.info(f"Bank Call Auth Response: {result}") # Check if access_token is present if 'access_token' not in result: