Skip to content

Commit

Permalink
Merge pull request #5339 from PanSpagetka/bz1684649
Browse files Browse the repository at this point in the history
Add safeguard for VMs without ext_management_system
  • Loading branch information
mzazrivec authored Mar 26, 2019
2 parents c11333c + 3f4ae45 commit aa5d916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/network_topology_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def build_entity_data(entity)
data[:status] = entity_status(entity)
data[:display_kind] = entity_display_type(entity)

if entity.kind_of?(Host) || entity.kind_of?(Vm)
if (entity.kind_of?(Host) || entity.kind_of?(Vm)) && entity.try(:ems_id)
data[:provider] = entity.ext_management_system.name
end

Expand Down

0 comments on commit aa5d916

Please sign in to comment.