Opened 2 months ago
Last modified 8 weeks ago
#37386 closed Bug
Inconsistent treatment of 0 by ModelAdmin.delete_confirmation_max_display attribute — at Version 2
| Reported by: | Jacob Walls | Owned by: | Jacob Walls |
|---|---|---|---|
| Component: | contrib.admin | Version: | 6.1 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Karolis Ryselis | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
ModelAdmin.delete_confirmation_max_display was added first in #10919 (6.1), and it treated zero as "show no objects" about to be deleted.
It was then adapted for a very similar use for inlines in #36984 (6.1), but the treatment of 0 was flipped from "show none" to "show all".
We had an explicit test over the template response for the former case confirming "no objects shown", but the flipped logic still caused some over-processing under the hood. Then, for inlines, 0 now means the opposite ("show all").
Opening a PR with a unit test shortly.
Change History (2)
comment:1 by , 2 months ago
| Has patch: | set |
|---|---|
| Needs tests: | unset |
comment:2 by , 2 months ago
| Description: | modified (diff) |
|---|
PR