FIX(wallet): hot fix

hot fix
This commit is contained in:
Haydar Ghasemi 2026-02-09 13:56:43 +03:30
parent 53cc3f67ee
commit fd244950e1

View file

@ -234,7 +234,7 @@ class Transaction(BaseModel):
raise UnprocessableEntity('not enough balance') raise UnprocessableEntity('not enough balance')
if not payer_is_allowed_negative_balance: if not payer_is_allowed_negative_balance:
updated = Account.objects.filter(pk=self.payer_account.pk, balance__gt=self.amount).update(balance=F('balance') - self.amount) updated = Account.objects.filter(pk=self.payer_account.pk, balance__gte=self.amount).update(balance=F('balance') - self.amount)
else: else:
updated = Account.objects.filter(pk=self.payer_account.pk).update(balance=F('balance') - self.amount) updated = Account.objects.filter(pk=self.payer_account.pk).update(balance=F('balance') - self.amount)