From df7efdb447d2f8649085c1b4e50d67c99cb84b7e Mon Sep 17 00:00:00 2001 From: Ladislav Smola Date: Fri, 20 Jan 2017 12:14:38 +0100 Subject: [PATCH] Use :id instead of :_object for saving of cloud tenants Use :id instead of :_object for saving of cloud_tenants --- app/models/ems_refresh/save_inventory_cloud.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ems_refresh/save_inventory_cloud.rb b/app/models/ems_refresh/save_inventory_cloud.rb index 93b23fb95d8..9512f18ba50 100644 --- a/app/models/ems_refresh/save_inventory_cloud.rb +++ b/app/models/ems_refresh/save_inventory_cloud.rb @@ -90,7 +90,7 @@ def save_flavors_inventory(ems, hashes, target = nil) end hashes.each do |h| - h[:cloud_tenants] = (h.fetch_path(:cloud_tenants) || []).compact.map { |x| x[:_object] }.uniq + h[:cloud_tenant_ids] = (h.delete(:cloud_tenants) || []).compact.map { |x| x[:id] }.uniq end save_inventory_multi(ems.flavors, hashes, deletes, [:ems_ref])