[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-bank] 01/04: Switch to new date format.
From: |
gnunet |
Subject: |
[taler-bank] 01/04: Switch to new date format. |
Date: |
Wed, 08 Jan 2020 17:54:21 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
commit 6e1c200a88f321a2f41ba56ea34b9ed1b9ef6e4a
Author: Florian Dold <address@hidden>
AuthorDate: Thu Dec 19 11:46:27 2019 +0100
Switch to new date format.
---
talerbank/app/views.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 4f36ba6..4dfab7a 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -754,7 +754,7 @@ def build_history_response(qs, cancelled, user_account):
sign=sign_,
wt_subject=entry.subject,
row_id=entry.id,
- date="/Date(" + str(int(entry.date.timestamp())) + ")/",
+ date=dict(t_ms=int(entry.date.timestamp())*1000)
)
)
return history
@@ -1035,10 +1035,12 @@ def api_withdraw_operation(request, withdraw_id):
def check_transfer_allowed(balance, balance_is_debit, debt_limit,
transfer_amount):
- if amount_is_debit:
- total_debt = Amount(**transfer_amount).add(balance)
+ if balance_is_debit:
+ total_debt = Amount(**transfer_amount.dump())
+ total_debt.add(balance)
return Amount.cmp(total_debt, debt_limit) <= 0
- max_transfer = Amount(**balance).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.