Skip to content

Commit

Permalink
fix: add file uploads support for modal forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Mng-dev-ai committed Feb 3, 2025
1 parent c3d77bc commit 8932bf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_modal_actions/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def execute_modal_action(
{"success": False, "errors": {"__all__": ["Permission denied"]}}
)
if form_class:
form = form_class(request.POST)
form = form_class(request.POST, request.FILES)
if form.is_valid():
response = action_func(request, queryset_or_obj, form.cleaned_data)
self.message_user(request, str(response), messages.SUCCESS)
Expand Down

0 comments on commit 8932bf0

Please sign in to comment.