Skip to content

Commit

Permalink
fix: submit line actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav committed Dec 29, 2022
1 parent b604a35 commit 701016d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/unfold/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,7 @@ def _get_action_url(func, name):
def save_model(self, request, obj, form, change):
super().save_model(request, obj, form, change)

for action in self.get_actions_submit_line():
action_attrs = self.get_unfold_action(action)

for action_attrs in self.get_actions_submit_line():
if action_attrs["action_name"] not in request.POST:
continue

Expand All @@ -470,6 +468,7 @@ def _get_instance_method(self, method_name):

if not callable(method):
raise UnfoldException(f"{method_name} is not callable")

return method

def get_action_choices(self, request, default_choices=BLANK_CHOICE_DASH):
Expand Down

0 comments on commit 701016d

Please sign in to comment.