From: Stephen Finucane Date: Tue, 7 Feb 2017 21:53:55 +0000 (+0000) Subject: REST: Resolve issues with since, until filters X-Git-Tag: v2.0.0-rc1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f380cc58aa3daa0d6e63ccb9f27dbb064f45aa1d;p=thirdparty%2Fpatchwork.git REST: Resolve issues with since, until filters 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 Fixes: 0fc32337 ("REST: Integrate django-filter support") Reviewed-by: Andy Doan --- diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py index f475ca84..ecef304c 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')