From 9d756afb07de8ef6e4d1980413979496643f1c3b Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 25 May 2023 01:00:50 +1000 Subject: [PATCH] Refs #34593 -- Commented that the extra count is necessary in ChangeList.get_results(). --- django/contrib/admin/views/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index c99972c2bd2..c659474e7dd 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -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: