diff options
| author | nessita <124304+nessita@users.noreply.github.com> | 2023-04-22 07:23:22 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-22 12:23:22 +0200 |
| commit | 851b6879565bfd8f7cc8005b3f92c0437de0bfff (patch) | |
| tree | 81b1720ebbcda60da68bce26d457f2ffb915ba42 | |
| parent | 92537e83c1322c40dd39a8f0f9c78018307f2102 (diff) | |
Refs #34462 -- Fixed queryset antipattern when processing object deletion.
| -rw-r--r-- | django/contrib/admin/actions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/actions.py b/django/contrib/admin/actions.py index e1e76cc31a..bf43c5d460 100644 --- a/django/contrib/admin/actions.py +++ b/django/contrib/admin/actions.py @@ -43,7 +43,7 @@ def delete_selected(modeladmin, request, queryset): if request.POST.get("post") and not protected: if perms_needed: raise PermissionDenied - n = queryset.count() + n = len(queryset) if n: for obj in queryset: obj_display = str(obj) |
