Skip to content
Snippets Groups Projects
Commit 7f7b720f authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Return None if the filter for a show is not invalid

parent f75037c7
No related branches found
No related tags found
No related merge requests found
Pipeline #1788 passed
...@@ -103,6 +103,13 @@ class ShowFilterSet(StaticFilterHelpTextMixin, filters.FilterSet): ...@@ -103,6 +103,13 @@ class ShowFilterSet(StaticFilterHelpTextMixin, filters.FilterSet):
else: else:
return queryset.exclude(id__in=show_ids, is_active=True) return queryset.exclude(id__in=show_ids, is_active=True)
@property
def qs(self):
if any([key for key in self.request.GET.keys() if key not in self.Meta.fields]):
return None
else:
return super().qs
class Meta: class Meta:
model = models.Show model = models.Show
fields = [ fields = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment