summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sanders <shang.xiao.sanders@gmail.com>2023-05-25 01:00:50 +1000
committerGitHub <noreply@github.com>2023-05-24 12:00:50 -0300
commit9d756afb07de8ef6e4d1980413979496643f1c3b (patch)
tree4c3a7df41b70195e61c6a0052f3c7dfa8f1f7832
parent0c1518ee429b01c145cf5b34eab01b0b92f8c246 (diff)
Refs #34593 -- Commented that the extra count is necessary in ChangeList.get_results().
-rw-r--r--django/contrib/admin/views/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py
index c99972c2bd..c659474e7d 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: