diff --git a/app/models/service.rb b/app/models/service.rb index 4fc349f8b717..1f5be83d3065 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -185,7 +185,7 @@ def direct_vms end def all_vms - MiqPreloader.preload_and_map(subtree, :direct_vms) + MiqPreloader.preload(subtree, :direct_vms).flat_map(&:direct_vms) end def vms