FIX(wallet): hot fix
hot fix
This commit is contained in:
parent
53cc3f67ee
commit
fd244950e1
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue