From 3fd1c0c61741e5dd6c4f96de1aa58f05ddd5fadd Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Mon, 23 May 2016 15:35:21 +0200 Subject: [PATCH] TaskQuerySet: Add recurring native filter --- tasklib/task.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasklib/task.py b/tasklib/task.py index 7c4cdff..c7c9e6d 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -15,6 +15,7 @@ PENDING = 'pending' COMPLETED = 'completed' DELETED = 'deleted' WAITING = 'waiting' +RECURRING = 'recurring' logger = logging.getLogger(__name__) @@ -522,6 +523,9 @@ class TaskQuerySet(object): def waiting(self): return self.filter(status=WAITING) + def recurring(self): + return self.filter(status=RECURRING) + def filter(self, *args, **kwargs): """ Returns a new TaskQuerySet with the given filters added. -- 2.39.5