From 61501b317df7b219255bb5c32b1b4b87a36962bc Mon Sep 17 00:00:00 2001 From: d-m-u Date: Thu, 29 Mar 2018 16:22:19 -0400 Subject: [PATCH] Fix update_attributes to take right number of args --- app/models/miq_retire_task.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/models/miq_retire_task.rb b/app/models/miq_retire_task.rb index 97a5d59a798..7fdd9c52a74 100644 --- a/app/models/miq_retire_task.rb +++ b/app/models/miq_retire_task.rb @@ -5,7 +5,6 @@ class MiqRetireTask < MiqRequestTask def self.get_description(req_obj) name = if req_obj.source.nil? - # Single source has not been selected yet if req_obj.options[:src_ids].length == 1 m = model_being_retired.find_by(:id => req_obj.options[:src_ids].first) m.nil? ? "" : m.name @@ -14,7 +13,7 @@ def self.get_description(req_obj) end else req_obj.source.name - end + end new_settings = [] "#{request_class::TASK_DESCRIPTION} for: #{name} - #{new_settings.join(", ")}" @@ -44,7 +43,7 @@ def deliver_to_automate(req_type = request_type, zone = nil) :args => [args], :role => 'automate', :zone => options.fetch(:miq_zone, zone), - :tracking_label => my_task_id, + :tracking_label => tracking_label_id, ) update_and_notify_parent(:state => "pending", :status => "Ok", :message => "Automation Starting") else @@ -53,7 +52,7 @@ def deliver_to_automate(req_type = request_type, zone = nil) end def after_request_task_create - update_attributes(:description, get_description) + update_attributes(:description => get_description) end def after_ae_delivery(ae_result)