Skip to content

Commit

Permalink
Merge pull request #448 from d-m-u/bz1594469
Browse files Browse the repository at this point in the history
Pass changed dialog field values to resource_action_workflow
  • Loading branch information
bdunne authored Sep 12, 2018
2 parents 60b9ae0 + 26bde70 commit d4520f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/controllers/api/base_controller/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ def invoke_custom_action_with_dialog(type, resource, action, data, custom_button

def submit_custom_action_dialog(resource, custom_button, data)
wf = ResourceActionWorkflow.new({}, User.current_user, custom_button.resource_action, :target => resource)
data.each { |key, value| wf.set_value(key, value) } if data.present?
wf_result = wf.submit_request
wf_result = wf.submit_request(data)
raise StandardError, Array(wf_result[:errors]).join(", ") if wf_result[:errors].present?
wf_result
end
Expand Down

0 comments on commit d4520f8

Please sign in to comment.