random play on the data

This commit is contained in:
CHIEFSOFT\ameye
2025-05-03 08:52:25 -04:00
parent bd6edf52e1
commit d28bf95c97
+4 -1
View File
@@ -8,6 +8,8 @@ from app.api.enums import TransactionType
from app.api.integrations import SimbrellaIntegration
from app.extensions import db
from app.models import Offer
import random
class EligibilityCheckService(BaseService):
TRANSACTION_TYPE = TransactionType.ELIGIBILITY_CHECK
@@ -68,7 +70,8 @@ class EligibilityCheckService(BaseService):
for offer in offers:
# Determine an approved amount
approved_amount = min(offer.max_amount, 5000)
random_float = random.random() # temporary to play data
approved_amount = min(offer.max_amount, offer.max_amount * random_float) #temporary for now
transaction_offer = TransactionOffer.create_transaction_offer(
customer_id = customer.id,