1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #6388: Fix CLI output after deleting all disk snapshots (#2814)

This commit is contained in:
Pavel Czerný 2023-11-15 13:41:57 +01:00 committed by GitHub
parent ca64f96f26
commit da5e716bba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1451,7 +1451,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
vm_snapshots.each do |disk|
disk_id = disk['DISK_ID']
sshots = [disk['SNAPSHOT']].flatten
sshots = [disk['SNAPSHOT'] || []].flatten
sshots.each do |snapshot|
data = snapshot.merge('DISK_ID' => disk_id)
snapshots << data