Skip to content

Commit

Permalink
REST: Disable control for filtering patches by series in web view
Browse files Browse the repository at this point in the history
As with the events view, creating and rendering the control for
filtering patches by series creates a massive slowdown. It's a little
sad not to be able to do this in the web UI as filtering patches
by series does make sense, but hopefully people figure out you can
still do it, just not from the web view.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Stephen Finucane <stephen@that.guru>
  • Loading branch information
daxtens authored and stephenfin committed May 15, 2018
1 parent 7a77f85 commit ba5b669
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions patchwork/api/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ class Meta:
class CoverLetterFilterSet(TimestampMixin, FilterSet):

project = ProjectFilter(queryset=Project.objects.all())
series = BaseFilter(queryset=Project.objects.all())
# NOTE(stephenfin): We disable the select-based HTML widgets for these
# filters as the resulting query is _huge_
series = BaseFilter(queryset=Project.objects.all(),
widget=MultipleHiddenInput)
submitter = PersonFilter(queryset=Person.objects.all())

class Meta:
Expand All @@ -179,7 +182,10 @@ class Meta:
class PatchFilterSet(TimestampMixin, FilterSet):

project = ProjectFilter(queryset=Project.objects.all())
series = BaseFilter(queryset=Series.objects.all())
# NOTE(stephenfin): We disable the select-based HTML widgets for these
# filters as the resulting query is _huge_
series = BaseFilter(queryset=Series.objects.all(),
widget=MultipleHiddenInput)
submitter = PersonFilter(queryset=Person.objects.all())
delegate = UserFilter(queryset=User.objects.all())
state = StateFilter(queryset=State.objects.all())
Expand Down

0 comments on commit ba5b669

Please sign in to comment.