[PATCH 3/4] REST: move SeriesFilter below StateFilter
Philippe Pepiot
phil at philpep.org
Mon Jul 17 05:32:11 AEST 2017
So the first can use the second in its declaration.
Signed-off-by: Philippe Pepiot <phil at philpep.org>
---
patchwork/api/filters.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py
index 9966543..7bf574d 100644
--- a/patchwork/api/filters.py
+++ b/patchwork/api/filters.py
@@ -71,13 +71,6 @@ class ProjectMixin(FilterSet):
queryset=Project.objects.all())
-class SeriesFilter(ProjectMixin, TimestampMixin, FilterSet):
-
- class Meta:
- model = Series
- fields = ('submitter', 'project')
-
-
class CoverLetterFilter(ProjectMixin, TimestampMixin, FilterSet):
class Meta:
@@ -110,6 +103,13 @@ class StateFilter(ModelChoiceFilter):
field_class = StateChoiceField
+class SeriesFilter(ProjectMixin, TimestampMixin, FilterSet):
+
+ class Meta:
+ model = Series
+ fields = ('submitter', 'project')
+
+
class PatchFilter(ProjectMixin, TimestampMixin, FilterSet):
state = StateFilter(queryset=State.objects.all())
--
2.11.0
More information about the Patchwork
mailing list