Looking for customer

This commit is contained in:
CHIEFSOFT\ameye
2025-05-24 07:02:50 -04:00
parent 2ae49ace86
commit 3e9d5d4089
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -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')
+4
View File
@@ -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: