From 61f206e097c3598f4039ab0aec49bf1b5b4ca5f5 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Sat, 28 Oct 2023 13:16:12 -0400 Subject: [PATCH] Merge pull request #475 from jaywcarman/vpc_flavor_disks_safe_nav Handle VPC flavor with nil :disks value (cherry picked from commit 0f3d09547ab2f72f06f405b3ba2fe58587589090) --- 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],