mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Refs #34462 -- Fixed queryset antipattern when processing object deletion.
This commit is contained in:
parent
92537e83c1
commit
851b687956
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user