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: make "+" sign in 'delta


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: make "+" sign in 'delta' /history's parameter optional.
Date: Tue, 09 May 2017 21:41: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 2591b26  make "+" sign in 'delta' /history's parameter optional.
2591b26 is described below

commit 2591b268c3074047a1763a1ea610a682ed3b7a9c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue May 9 21:41:09 2017 +0200

    make "+" sign in 'delta' /history's parameter optional.
---
 talerbank/app/views.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 5c08ed6..2ba00b4 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -339,8 +339,8 @@ def history(request):
     delta = request.GET.get("delta")
     if not delta:
         return HttpResponseBadRequest()
-    #FIXME: make the '+' sign optional
-    parsed_delta = re.search("([\+-])([0-9]+)", delta)
+    #FIXME: make the '+' sign optional 
+    parsed_delta = re.search("(\+-)?([0-9]+)", delta)
     try:
         parsed_delta.group(0)
     except AttributeError:
@@ -358,7 +358,7 @@ def history(request):
     sign_filter = Q()
     if "-" == sign and start:
         sign_filter = Q(id__lt=start)
-    elif "+" == sign and start:
+    elif ("+" == sign or "" == sign) and start:
         sign_filter = Q(id__gt=start)
         sign = ""
 

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



reply via email to

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