Skip to content

Commit

Permalink
fixes TrangPham#37: respect @admin.action
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Kurilin committed May 7, 2022
1 parent c76c78d commit 9785cc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin_confirm/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
from typing import Dict
from django.contrib.admin.exceptions import DisallowedModelAdminToField
from django.contrib.admin.utils import flatten_fieldsets, unquote
Expand Down Expand Up @@ -449,6 +450,7 @@ def confirm_action(func):
return to the changelist without performing action.
"""

@functools.wraps(func)
def func_wrapper(modeladmin, request, queryset):
# First called by `Go` which would not have confirm_action in params
if request.POST.get("_confirm_action"):
Expand Down

0 comments on commit 9785cc2

Please sign in to comment.