gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-bank] branch master updated: use the terrible Amount API correctl


From: gnunet
Subject: [taler-bank] branch master updated: use the terrible Amount API correctly
Date: Thu, 19 Dec 2019 11:53:12 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 8401d78  use the terrible Amount API correctly
8401d78 is described below

commit 8401d7843b80859e8c001f190cd0a2396041507f
Author: Florian Dold <address@hidden>
AuthorDate: Thu Dec 19 11:52:54 2019 +0100

    use the terrible Amount API correctly
---
 talerbank/app/views.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 191c2e1..1b16324 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -1036,9 +1036,11 @@ def api_withdraw_operation(request, withdraw_id):
 
 def check_transfer_allowed(balance, balance_is_debit, debt_limit, 
transfer_amount):
     if balance_is_debit:
-        total_debt = Amount(**transfer_amount.dump()).add(balance)
+        total_debt = Amount(**transfer_amount.dump())
+        total_debt.add(balance)
         return Amount.cmp(total_debt, debt_limit) <= 0
-    max_transfer = Amount(**balance.dump()).add(debt_limit)
+    max_transfer = Amount(**balance.dump())
+    max_transfer.add(debt_limit)
     return Amount.cmp(transfer_amount, max_transfer) <= 0
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]