Skip to content

Commit

Permalink
Update lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Shimon Shtein <[email protected]>
  • Loading branch information
sbernhard and ShimShtein authored Aug 8, 2024
1 parent d160629 commit e757a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def list_vm_volumes(vm_id)
attachment_disk.bootable = bootable if attachment_disk.bootable.nil?
attachment_disk.interface = interface if attachment_disk.interface.nil?
attachment_disk.storage_domain = begin
attachment_disk.storage_domains[0].id || nil
attachment_disk.storage_domains&.first&.id || nil
rescue StandardError => e
Fog::Logger.warning("Error parsing attachment_disk.storage_domains response json - #{e}. Fallback to 0")
0
Expand Down

0 comments on commit e757a56

Please sign in to comment.