[PATCH] REST: Resolve issues with since, until filters
Stephen Finucane
stephen at that.guru
Wed Feb 8 08:53:55 AEDT 2017
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 at that.guru>
Fixes: 0fc32337 ("REST: Integrate django-filter support")
Cc: Andy Doan <andy.doan at linaro.org>
---
I've reported this upstream [1] but we want this to work now.
[1] https://github.com/carltongibson/django-filter/issues/618
---
patchwork/api/filters.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py
index f475ca8..ecef304 100644
--- a/patchwork/api/filters.py
+++ b/patchwork/api/filters.py
@@ -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')
--
2.9.3
More information about the Patchwork
mailing list