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: Dates comparison


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: Dates comparison
Date: Tue, 02 Apr 2019 19:05: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 d865e0d  Dates comparison
d865e0d is described below

commit d865e0df3de8165e01b145b927d224b763991a95
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Apr 2 19:05:51 2019 +0200

    Dates comparison
---
 talerbank/app/views.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 9249cf3..5002e08 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -605,7 +605,13 @@ def query_history_range(bank_account,
                         start,
                         end,
                         descending):
-    pass
+    qs = BankTransaction.objects.filter(
+        direction_switch(bank_account, direction),
+        Q(date__gte=start),
+        Q(date__lte=end))
+    
+    order = "-id" if descending else "id"
+    return qs.order_by(order)
 
 
 ##

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



reply via email to

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