Skip to content

Commit

Permalink
fixes #37: respect @admin.action (#38)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimir Kurilin <kurilin@tochka.com>
  • Loading branch information
vkurilin and Vladimir Kurilin committed Jul 7, 2022
1 parent c76c78d commit 226c872
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 226c872

Please sign in to comment.