]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
events-api: allow filtering by date
authorAaron Conole <aconole@bytheb.org>
Wed, 14 Jun 2017 18:14:23 +0000 (14:14 -0400)
committerStephen Finucane <stephen@that.guru>
Wed, 28 Jun 2017 19:55:45 +0000 (20:55 +0100)
This commit allows users of the REST API to query for events based on
the date field.  This will allow utility writers to select a smaller
subset of events when polling.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/api/filters.py

index 3dc215c0485fb5d3814bd73e07f3484de295e1b5..666a3d86ea2376fb7399ef51424eaa99137e3eda 100644 (file)
@@ -127,7 +127,7 @@ class CheckFilter(TimestampMixin, FilterSet):
         fields = ('user', 'state', 'context')
 
 
-class EventFilter(ProjectMixin, FilterSet):
+class EventFilter(ProjectMixin, TimestampMixin, FilterSet):
 
     class Meta:
         model = Event