]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
REST: Resolve issues with since, until filters
authorStephen Finucane <stephen@that.guru>
Tue, 7 Feb 2017 21:53:55 +0000 (21:53 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 1 Mar 2017 22:11:04 +0000 (22:11 +0000)
It would appear that object-based mixins don't work with django-filter's
FilterSet. This should probably be fixed upstream, but for now let's
live with the extra duplication.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 0fc32337 ("REST: Integrate django-filter support")
Reviewed-by: Andy Doan <andy.doan@linaro.org>
patchwork/api/filters.py

index f475ca84e995c52e53bbbc17de4525b83c30e0c6..ecef304ce8352407b03ba011833e6546e22dcb60 100644 (file)
@@ -26,7 +26,7 @@ from patchwork.models import Patch
 from patchwork.models import Series
 
 
-class TimestampMixin(object):
+class TimestampMixin(FilterSet):
 
     # TODO(stephenfin): These should filter on a 'updated_at' field instead
     before = IsoDateTimeFilter(name='date', lookup_expr='lt')