Skip to content

Commit

Permalink
Fix update_attributes to take right number of args
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Apr 3, 2018
1 parent 43dca86 commit 61501b3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/models/miq_retire_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(", ")}"
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 61501b3

Please sign in to comment.