Skip to content

Commit

Permalink
Use :id instead of :_object for saving of cloud tenants
Browse files Browse the repository at this point in the history
Use :id instead of :_object for saving of cloud_tenants
  • Loading branch information
Ladas committed Apr 11, 2017
1 parent 1199533 commit df7efdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/ems_refresh/save_inventory_cloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit df7efdb

Please sign in to comment.