In my case, the list filter filters the objects by default, and removes
the filtering with a query parameter. The optimization incorrectly assumes
that there is no filtering by default, so the total result count is wrong.
https://github.com/django/django/blob/master/django/contrib/admin/views/main.py#L172,
see 'Perform a slight optimization'.
--
Ticket URL: <https://code.djangoproject.com/ticket/22810>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* type: Uncategorized => Bug
* needs_tests: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/22810#comment:1>
Comment (by slurms):
PR here: https://github.com/django/django/pull/5576.
--
Ticket URL: <https://code.djangoproject.com/ticket/22810#comment:2>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/22810#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"5fa7b592b3f43282823045954c61a1f9a4b31a7f" 5fa7b59]:
{{{
#!CommitTicketReference repository=""
revision="5fa7b592b3f43282823045954c61a1f9a4b31a7f"
Fixed #22810 -- Corrected admin changelist count for list filters that
filter by default.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22810#comment:4>