Update offer_analysis.py

This commit is contained in:
VivianDee
2025-11-12 14:19:02 +01:00
parent e78e7402c8
commit 537b6d68f9
+6 -1
View File
@@ -225,7 +225,8 @@ class OfferAnalysis:
if approved_amount < offer.min_amount:
logger.error(f"Max eligible amount ({approved_amount}) is less than the minimum offer amount ({offer.min_amount}).")
raise ValueError("You are not eligible for a loan at this time.")
continue
# raise ValueError("You are not eligible for a loan at this time.")
# if approved_amount < 100:
# logger.error(f"Max eligible amount ({approved_amount}) is less than the minimum offer amount ({offer.min_amount}).")
@@ -255,4 +256,8 @@ class OfferAnalysis:
"tenor": offer.tenor
})
if not eligible_offers:
logger.error("No eligible offers found for customer: {customer_id}.")
raise ValueError("You are not eligible for a loan at this time.")
return eligible_offers