Merge pull request 'FIX(wallet): hot fix' (#7) from FIX/gte-in-withdraw into master
Reviewed-on: https://git.mindplus-dev.ir/sahama/wallet/pulls/7
This commit is contained in:
commit
8acf7bc6c1
1 changed files with 1 additions and 1 deletions
|
|
@ -234,7 +234,7 @@ class Transaction(BaseModel):
|
|||
raise UnprocessableEntity('not enough 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:
|
||||
updated = Account.objects.filter(pk=self.payer_account.pk).update(balance=F('balance') - self.amount)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue