Skip to content

Commit ba5b669

Browse files
daxtensstephenfin
authored andcommitted
REST: Disable control for filtering patches by series in web view
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>
1 parent 7a77f85 commit ba5b669

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

patchwork/api/filters.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ class Meta:
168168
class CoverLetterFilterSet(TimestampMixin, FilterSet):
169169

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

174177
class Meta:
@@ -179,7 +182,10 @@ class Meta:
179182
class PatchFilterSet(TimestampMixin, FilterSet):
180183

181184
project = ProjectFilter(queryset=Project.objects.all())
182-
series = BaseFilter(queryset=Series.objects.all())
185+
# NOTE(stephenfin): We disable the select-based HTML widgets for these
186+
# filters as the resulting query is _huge_
187+
series = BaseFilter(queryset=Series.objects.all(),
188+
widget=MultipleHiddenInput)
183189
submitter = PersonFilter(queryset=Person.objects.all())
184190
delegate = UserFilter(queryset=User.objects.all())
185191
state = StateFilter(queryset=State.objects.all())

0 commit comments

Comments
 (0)