[update]: Eligibility check request
This commit is contained in:
@@ -27,10 +27,10 @@ class Account(db.Model):
|
||||
def is_valid_account(cls, account_id, customer_id):
|
||||
account = cls.query.filter_by(id=account_id, customer_id=customer_id).first()
|
||||
if not account:
|
||||
return False, "Account not found or doesn't belong to customer"
|
||||
return False
|
||||
if account.lien_amount > 0:
|
||||
return False, "Account has an existing lien"
|
||||
return True, "Account is valid"
|
||||
return False
|
||||
return True
|
||||
|
||||
def __repr__(self):
|
||||
return f'<Account {self.id}>'
|
||||
|
||||
Reference in New Issue
Block a user