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

(cherry picked from commit da5e716bba)
This commit is contained in:
Pavel Czerný authored and Ruben S. Montero committed 2023-11-15 13:42:28 +01:00
1 parent 5721f1afec
commit eac404a950
1 file changed
+1 -1
+1 -1
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