Refs #34593 -- Commented that the extra count is necessary in ChangeList.get_results().

This commit is contained in:
David Sanders 2023-05-25 01:00:50 +10:00 committed by GitHub
parent 0c1518ee42
commit 9d756afb07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -312,6 +312,9 @@ class ChangeList:
result_count = paginator.count
# Get the total number of objects, with no admin filters applied.
# Note this isn't necessarily the same as result_count in the case of
# no filtering. Filters defined in list_filters may still apply some
# default filtering which may be removed with query parameters.
if self.model_admin.show_full_result_count:
full_result_count = self.root_queryset.count()
else: