gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-bank] branch master updated: fix 'sign' regex


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: fix 'sign' regex
Date: Wed, 10 May 2017 08:58:35 +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 10ec225  fix 'sign' regex
10ec225 is described below

commit 10ec22583055896fdfe9c90609599e37bd6d3413
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed May 10 08:58:26 2017 +0200

    fix 'sign' regex
---
 talerbank/app/views.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index f47d614..a0be3b4 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -340,7 +340,7 @@ def history(request):
     if not delta:
         return HttpResponseBadRequest()
     #FIXME: make the '+' sign optional 
-    parsed_delta = re.search("(\+-)?([0-9]+)", delta)
+    parsed_delta = re.search("([\+-])?([0-9]+)", delta)
     try:
         parsed_delta.group(0)
     except AttributeError:
@@ -361,7 +361,6 @@ def history(request):
     elif ("+" == sign or "" == sign) and start:
         sign_filter = Q(id__gt=start)
         sign = ""
-
     # direction (debit/credit)
     direction = request.GET.get("direction")
 
@@ -376,11 +375,6 @@ def history(request):
             logger.error("Attempted /history about non existent account")
             return JsonResponse(dict(error="Queried account does not exist"), 
status=404)
 
-    # Temporarily only allowing querying for the user's owned unique
-    # account.  Future releases will give the way for user A to query
-    # about multiple accounts of his own, or others accounts from other
-    # users.
-
     if target_account != user_account.bankaccount:
         return JsonResponse(dict(error="Querying unowned accounts not 
allowed"), status=403)
 

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



reply via email to

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