From 87928297201b0acc90bff85bccf80f08539bcf62 Mon Sep 17 00:00:00 2001 From: Zita Nemeckova Date: Fri, 30 Jun 2017 10:54:05 +0200 Subject: [PATCH] Add missing nodes and conditions --- app/presenters/tree_builder_belongs_to_hac.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/presenters/tree_builder_belongs_to_hac.rb b/app/presenters/tree_builder_belongs_to_hac.rb index ee15449c2aa2..6f2ec7797b0b 100644 --- a/app/presenters/tree_builder_belongs_to_hac.rb +++ b/app/presenters/tree_builder_belongs_to_hac.rb @@ -63,6 +63,7 @@ def x_get_provider_kids(parent, count_only) def x_get_tree_datacenter_kids(parent, count_only) kids = [] parent.folders.each do |child| + kids.concat([child]) if child.kind_of?(EmsFolder) && child.name == 'datastore' next unless child.kind_of?(EmsFolder) && child.name == "host" kids.concat(child.folders_only) kids.concat(child.clusters) @@ -76,7 +77,7 @@ def x_get_tree_cluster_kids(parent, count_only) end def x_get_resource_pool_kids(parent, count_only) - count_only_or_objects(count_only, parent.is_default? ? parent.resource_pools : []) + count_only_or_objects(count_only, parent.resource_pools) end def x_get_tree_folder_kids(parent, count_only = false)