Skip to content

Commit

Permalink
Load not just the values into update the fields
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Sep 11, 2018
1 parent c115691 commit 545e4bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/models/resource_action_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 545e4bc

Please sign in to comment.