From 545e4bcb8028fa2ec15faad561a37affe93343c9 Mon Sep 17 00:00:00 2001 From: d-m-u Date: Tue, 11 Sep 2018 11:54:31 -0400 Subject: [PATCH] Load not just the values into update the fields --- app/models/dialog.rb | 2 +- app/models/resource_action_workflow.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/dialog.rb b/app/models/dialog.rb index e64d057a5501..9d6f73119d35 100644 --- a/app/models/dialog.rb +++ b/app/models/dialog.rb @@ -93,7 +93,7 @@ def load_values_into_fields(values, overwrite = true) dialog_field_hash.each_value do |field| field.dialog = self - new_value = values[field.automate_key_name] || values[field.name] + new_value = values[field.automate_key_name] || values[field.name] || values.dig("parameters", field.name) new_value ||= field.value unless overwrite field.value = new_value diff --git a/app/models/resource_action_workflow.rb b/app/models/resource_action_workflow.rb index e56b9e7ff6ec..7db6f704d84b 100644 --- a/app/models/resource_action_workflow.rb +++ b/app/models/resource_action_workflow.rb @@ -31,7 +31,7 @@ def add_request_to_cart end def update_dialog_field_values(data) - @dialog.load_values_into_fields(data.values.first) + @dialog.load_values_into_fields(data) end def process_request(state)