added loop
This commit is contained in:
+2
-1
@@ -227,5 +227,6 @@ class Loan(db.Model):
|
||||
"""
|
||||
customer_loans = cls.query.filter_by( customer_id = customer_id).all()
|
||||
if not customer_loans:
|
||||
raise ValueError(f"Customer with Id {customer_id} does not have any loan.")
|
||||
raise ValueError(f"Customer with Id {customer_id} does not have any loan.")
|
||||
logger.info(f"Found {len(customer_loans)} loans for customer ID: {customer_id}")
|
||||
return customer_loans
|
||||
Reference in New Issue
Block a user