From 52edc732215621b06d0931665265694740680080 Mon Sep 17 00:00:00 2001 From: Jay Carman Date: Fri, 27 Oct 2023 17:48:30 -0500 Subject: [PATCH] Handle VPC flavor with nil :disks value Use safe navigation to parse a nil :disks value. --- app/models/manageiq/providers/ibm_cloud/inventory/parser/vpc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/ibm_cloud/inventory/parser/vpc.rb b/app/models/manageiq/providers/ibm_cloud/inventory/parser/vpc.rb index ea6775161..7999a580d 100644 --- a/app/models/manageiq/providers/ibm_cloud/inventory/parser/vpc.rb +++ b/app/models/manageiq/providers/ibm_cloud/inventory/parser/vpc.rb @@ -182,7 +182,7 @@ def vm_and_template_taggings(resource, tags_inventory_objects) def flavors collector.flavors.each do |flavor| memory = flavor&.dig(:memory, :value) - disk = flavor[:disks].first&.dig(:size, :value) || 0 + disk = flavor[:disks]&.first&.dig(:size, :value) || 0 persister.flavors.build( :ems_ref => flavor[:name], :name => flavor[:name],