forked from DigiFi/digifi-BankToProductCore
[add]: transaction fix
This commit is contained in:
@@ -65,6 +65,7 @@ class ProvideLoanService(BaseService):
|
||||
"message": "Invalid Offer."
|
||||
}), 400
|
||||
|
||||
|
||||
# Log Transaction
|
||||
transaction = ProvideLoanService.log_transaction(validated_data=validated_data)
|
||||
|
||||
|
||||
@@ -26,8 +26,15 @@ class TransactionOffer(db.Model):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def is_valid_transaction_offer(cls, offer_id):
|
||||
transaction_offer = cls.query.filter_by(id=str(offer_id)).first()
|
||||
|
||||
def is_valid_transaction_offer(cls, transaction_offer, customer_id, product_id):
|
||||
transaction_offer = cls.query.filter_by(
|
||||
id = transaction_offer,
|
||||
customer_id = customer_id,
|
||||
product_id = product_id
|
||||
# transaction_id = transaction_id,
|
||||
).first()
|
||||
|
||||
|
||||
if not transaction_offer:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user