[update]: Eligibility check request
This commit is contained in:
@@ -20,8 +20,8 @@ class Customer(db.Model):
|
||||
|
||||
@classmethod
|
||||
def create_customer(cls, id, msisdn, country_code, account_id, account_type='savings'):
|
||||
if cls.query.filter_by(msisdn=msisdn).first():
|
||||
return False, "Customer with this MSISDN already exists"
|
||||
if cls.query.filter_by(id=id).first():
|
||||
raise ValueError("Customer already exists")
|
||||
|
||||
# Create the customer
|
||||
customer = cls(id=id, msisdn=msisdn, country_code=country_code)
|
||||
|
||||
Reference in New Issue
Block a user