forked from DigiFi/digifi-BankToProductCore
Update offer_analysis.py
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user