diff roundup/backends/back_sqlite.py @ 5318:506c7ee9a385

Add a 'retired' parameter to Class.filter .. to allow searching for retired, non-retired or all (retired and non-retired) items similar to the argument of the same name to Class.getnodeids. This is 'False' by default (finding only non-retired items for backwards compatibility) and can be set to None (for finding retired and non-retired items) or True (for finding only retired items).
author Ralf Schlatterbeck <rsc@runtux.com>
date Thu, 19 Apr 2018 20:01:43 +0200
parents 198b6e810c67
children 62de601bdf6f
line wrap: on
line diff
--- a/roundup/backends/back_sqlite.py	Thu Apr 19 17:03:11 2018 +0200
+++ b/roundup/backends/back_sqlite.py	Thu Apr 19 20:01:43 2018 +0200
@@ -439,12 +439,12 @@
 
 class sqliteClass:
     def filter(self, search_matches, filterspec, sort=(None,None),
-            group=(None,None)):
+            group=(None,None), retired=False):
         """ If there's NO matches to a fetch, sqlite returns NULL
             instead of nothing
         """
         return [f for f in rdbms_common.Class.filter(self, search_matches,
-            filterspec, sort=sort, group=group) if f]
+            filterspec, sort=sort, group=group, retired=retired) if f]
 
 class Class(sqliteClass, rdbms_common.Class):
     pass

Roundup Issue Tracker: http://roundup-tracker.org/