From 35fda329d854c2ae269f773d380216e5e489bc79 Mon Sep 17 00:00:00 2001 From: felipedf Date: Wed, 9 May 2018 14:28:02 -0300 Subject: [PATCH] Fix a bug when portInfo was null --- .../parser/physical_network_ports_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/lenovo/physical_infra_manager/parser/physical_network_ports_parser.rb b/app/models/manageiq/providers/lenovo/physical_infra_manager/parser/physical_network_ports_parser.rb index c78cb0bcc8..956e4cbcee 100644 --- a/app/models/manageiq/providers/lenovo/physical_infra_manager/parser/physical_network_ports_parser.rb +++ b/app/models/manageiq/providers/lenovo/physical_infra_manager/parser/physical_network_ports_parser.rb @@ -29,7 +29,7 @@ def parse_physical_switch_ports(physical_switch) def parse_physical_server_ports(port) port_info = port["portInfo"] - physical_ports = port_info["physicalPorts"] + physical_ports = port_info&.dig('physicalPorts') physical_ports&.map do |physical_port| parsed_physical_port = parse_physical_port(physical_port) logical_ports = physical_port["logicalPorts"]