diff --git a/app/models/custom_button.rb b/app/models/custom_button.rb index b0eb0e82523..b8255cbf48d 100644 --- a/app/models/custom_button.rb +++ b/app/models/custom_button.rb @@ -1,7 +1,7 @@ class CustomButton < ApplicationRecord has_one :resource_action, :as => :resource, :dependent => :destroy, :autosave => true - serialize :options + serialize :options, Hash serialize :visibility_expression serialize :enablement_expression serialize :visibility diff --git a/spec/lib/task_helpers/exports/custom_buttons_spec.rb b/spec/lib/task_helpers/exports/custom_buttons_spec.rb index 5fc8afb0b1f..dd3ced705bc 100644 --- a/spec/lib/task_helpers/exports/custom_buttons_spec.rb +++ b/spec/lib/task_helpers/exports/custom_buttons_spec.rb @@ -26,7 +26,7 @@ "description" => "Export Test", "applies_to_class" => "Vm", "visibility_expression" => nil, - "options" => nil, + "options" => {}, "userid" => nil, "wait_for_complete" => nil, "name" => "export_test_button", @@ -44,7 +44,7 @@ "description" => "Export Test", "applies_to_class" => "Service", "visibility_expression" => nil, - "options" => nil, + "options" => {}, "userid" => nil, "wait_for_complete" => nil, "name" => "export_test_button2", diff --git a/spec/models/custom_button_spec.rb b/spec/models/custom_button_spec.rb index ab415d812a3..c2a2f35cfb8 100644 --- a/spec/models/custom_button_spec.rb +++ b/spec/models/custom_button_spec.rb @@ -251,7 +251,7 @@ "disabled_text" => nil, "enablement_expression" => nil, "applies_to_class" => nil, - "options" => nil, + "options" => {}, "userid" => nil, "wait_for_complete" => nil, "created_on" => nil,