Skip to content

Commit

Permalink
allow negative balances with card transfers (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
michielderoos committed Aug 3, 2022
1 parent 8c39f4a commit 06f72ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/server/me_api/credit_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def post(self):
receive_user = g.user
receive_transfer_account = my_transfer_account

if transfer_amount == 0 or transfer_amount > send_transfer_account.balance:
if not transfer_card and (transfer_amount == 0 or transfer_amount > send_transfer_account.balance):

db.session.commit()

Expand All @@ -305,7 +305,8 @@ def post(self):
transfer_use=transfer_use,
transfer_mode=transfer_mode,
uuid=uuid,
transfer_card=transfer_card)
transfer_card=transfer_card,
require_sufficient_balance=False)

except AccountNotApprovedError as e:
db.session.commit()
Expand Down

0 comments on commit 06f72ef

Please sign in to comment.