Skip to content

Commit

Permalink
Combine filters into one query
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Nov 2, 2019
1 parent aa7f7ff commit 7e228f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_filters/filterset.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def filter_queryset(self, queryset):
applied to the queryset before it is cached.
"""
for name, value in self.form.cleaned_data.items():
queryset = self.filters[name].filter(queryset, value)
queryset = self.filters[name].filter(queryset._next_is_sticky(), value)
assert isinstance(queryset, models.QuerySet), \
"Expected '%s.%s' to return a QuerySet, but got a %s instead." \
% (type(self).__name__, name, type(queryset).__name__)
Expand Down

0 comments on commit 7e228f5

Please sign in to comment.