Looking for customer
This commit is contained in:
@@ -29,7 +29,6 @@ class LoanStatusService(BaseService):
|
||||
# Validate data
|
||||
validated_data = LoanStatusService.validate_data(data, LoanStatusSchema())
|
||||
|
||||
|
||||
customer_id = validated_data.get('customerId')
|
||||
customer = Customer.get_customer(customer_id)
|
||||
transactionId = validated_data.get('transactionId')
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
from datetime import datetime, timezone
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from app.api.services.offer_analysis import logger
|
||||
from app.extensions import db
|
||||
from app.models.account import Account
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from sqlalchemy.sql import func
|
||||
from app.utils.logger import logger
|
||||
|
||||
class Customer(db.Model):
|
||||
__tablename__ = 'customers'
|
||||
@@ -73,6 +76,7 @@ class Customer(db.Model):
|
||||
"""
|
||||
Get customer by ID.
|
||||
"""
|
||||
logger.error(f"Looking for customer *** {customer_id}")
|
||||
customer = cls.query.filter_by(id=customer_id).first()
|
||||
|
||||
if not customer:
|
||||
|
||||
Reference in New Issue
Block a user