1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #21734 -- Handled ProtectedError in a POST to admin's delete_selected action.

This commit is contained in:
Akshesh
2016-03-28 11:58:51 +05:30
committed by Tim Graham
parent 724a279849
commit a7c813ba04
2 changed files with 9 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ def delete_selected(modeladmin, request, queryset):
# The user has already confirmed the deletion.
# Do the deletion and return a None to display the change list view again.
if request.POST.get('post'):
if request.POST.get('post') and not protected:
if perms_needed:
raise PermissionDenied
n = queryset.count()