aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2018-04-11 17:13:38 +0100
committerDaniel Axtens <dja@axtens.net>2018-05-10 02:22:18 +1000
commit7397142e9838c1b4bcfe6f5c42c3aa4864147067 (patch)
treed857b68184c6c39ea4a8147557e0faf2b0aeea42
parent30a5f17b5b8dbd42822c9f8eb4e222606ca43d6a (diff)
downloadpatchwork-7397142e9838c1b4bcfe6f5c42c3aa4864147067.tar
patchwork-7397142e9838c1b4bcfe6f5c42c3aa4864147067.tar.gz
REST: Use DRF-specific filterset
This variant of 'FilterSet' will convert a 'django.forms.ValidationError', which wouldn't be handled by DRF, to a 'rest_framework.exceptions.ValidationError', which would be. Signed-off-by: Stephen Finucane <stephen@that.guru> [dja: commit message] Signed-off-by: Daniel Axtens <dja@axtens.net>
-rw-r--r--patchwork/api/filters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py
index 4d8d504..f6fff79 100644
--- a/patchwork/api/filters.py
+++ b/patchwork/api/filters.py
@@ -20,7 +20,7 @@
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.db.models import Q
-from django_filters import FilterSet
+from django_filters.rest_framework import FilterSet
from django_filters import IsoDateTimeFilter
from django_filters import ModelMultipleChoiceFilter
from django.forms import ModelMultipleChoiceField as BaseMultipleChoiceField