[fix]: get_active_loans_by_original_transaction #28

Merged
ameye merged 2 commits from define_offers into master 2025-05-10 13:58:45 +00:00
2 changed files with 12 additions and 12 deletions
Showing only changes of commit 332c344efa - Show all commits
+1 -1
View File
@@ -35,7 +35,7 @@ class OfferAnalysis:
@staticmethod
def decide_offer(transaction_id, rac_check, validated_data, customer):
"""
"""
Find the last loan - it will have original_transaction
This loan is part of the original approval where transaction_id = original_transaction for this account
+11 -11
View File
@@ -156,18 +156,18 @@ class Loan(db.Model):
return loan
@classmethod
def get_active_loans_by_original_transaction(cls, original_transaction_id):
"""
Get all active loans with the same original_transaction ID.
"""
active_loans = cls.query.filter_by(
original_transaction=original_transaction_id,
# status='active'
).all()
@classmethod
def get_active_loans_by_original_transaction(cls, original_transaction_id):
"""
Get all active loans with the same original_transaction ID.
"""
active_loans = cls.query.filter_by(
original_transaction=original_transaction_id,
# status='active'
).all()
return active_loans
return active_loans
@classmethod