Skip to content

Commit

Permalink
Disconnect inventory on targeted refresh
Browse files Browse the repository at this point in the history
When doing a targeted refresh the condition to disconnect the target
from the ems included a check to see if there are any "storages",
this causes problems in some targeted refresh scenarios.
Since it does not seem to make sense this check is being removed.
  • Loading branch information
Boris Odnopozov committed Jun 20, 2018
1 parent f539f46 commit 56523a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/ems_refresh/save_inventory_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ def determine_deletes_using_association(ems, target, disconnect = true)
end

def hashes_of_target_empty?(hashes, target)
hashes.blank? || (hashes[:storages].blank? &&
hashes.blank? ||
case target
when VmOrTemplate
hashes[:vms].blank?
when Host
hashes[:hosts].blank?
when EmsFolder
hashes[:folders].blank?
end)
end
end
end

0 comments on commit 56523a7

Please sign in to comment.