[add]: loan ref to repayment
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user