[add]: loan ref to repayment

This commit is contained in:
VivianDee
2025-05-28 20:05:38 +01:00
parent 65472d3f07
commit 729cc26698
6 changed files with 21 additions and 26 deletions
+2
View File
@@ -48,6 +48,8 @@ class Customer(db.Model):
def create_customer(cls, id, msisdn, country_code, account_id, account_type='savings'):
if cls.query.filter_by(id=id).first():
raise ValueError("Customer already exists")
elif Account.query.filter_by(id=account_id).first():
raise ValueError("Account already exists")
# Create the customer
customer = cls(