From 26bde701a9883b9c729db40d18baf8f8fc375230 Mon Sep 17 00:00:00 2001 From: d-m-u Date: Mon, 13 Aug 2018 16:25:38 -0400 Subject: [PATCH] Pass changed dialog field values to resource_action_workflow --- app/controllers/api/base_controller/generic.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/base_controller/generic.rb b/app/controllers/api/base_controller/generic.rb index 078af3339e..56ad02aeb8 100644 --- a/app/controllers/api/base_controller/generic.rb +++ b/app/controllers/api/base_controller/generic.rb @@ -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