[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: fix JsonResponse invoca
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: fix JsonResponse invocation |
Date: |
Wed, 03 May 2017 22:10:58 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new 9cb82c4 fix JsonResponse invocation
9cb82c4 is described below
commit 9cb82c4f8520052b400a27036acfbfa4dbef2bc6
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed May 3 22:10:48 2017 +0200
fix JsonResponse invocation
---
talerbank/app/tests.py | 1 +
talerbank/app/views.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 4cb584f..4090d6a 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -111,6 +111,7 @@ class HistoryTestCase(TestCase):
"delta": 4, \
"direction": "whatever"}',
content_type="application/json")
+ # Because of the 'whatever' direction given
self.assertEqual(400, response.status_code)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 0d1c4d9..234a3cd 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -370,7 +370,7 @@ def history(request):
for entry in qs:
history.append(dict(amount=entry.amount_obj,
counterpart=entry.credit_account.user.username))
- return JsonResponse(dict(data=history), 200)
+ return JsonResponse(dict(data=history), status=200)
if "credit" == direction:
qs =
BankTransaction.objects.filter(Q(credit_account=user_account.bankaccount) &
@@ -378,7 +378,7 @@ def history(request):
for entry in qs:
history.append(dict(amount=entry.amount_obj,
counterpart=entry.debit_account.user.username))
- return JsonResponse(dict(data=history), 200)
+ return JsonResponse(dict(data=history), status=200)
return JsonResponse(dict(error="Unknown 'direction' indication"),
status=400)
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-bank] branch master updated: fix JsonResponse invocation,
gnunet <=