1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.6.x] Fixed #21510 -- Readded search reset link in changelist search bar

Thanks moritz.pfeiffer at alp-phone.ch for the report and
Tim Graham for the initial patch.
Backport of c7c647419c from master.
This commit is contained in:
Claude Paroz
2013-12-07 14:11:27 +01:00
parent 64483b4831
commit d32637d81b
3 changed files with 15 additions and 4 deletions

View File

@@ -223,7 +223,7 @@ class ChangeList(six.with_metaclass(RenameChangeListMethods)):
# Perform a slight optimization:
# full_result_count is equal to paginator.count if no filters
# were applied
if self.get_filters_params():
if self.get_filters_params() or self.params.get(SEARCH_VAR):
full_result_count = self.root_queryset.count()
else:
full_result_count = result_count