fix(backups/formatVmBackup): handle snapshotless backups (#7342)

Introduced by b48d955c44
This commit is contained in:
Florent BEAUCHAMP
2024-01-30 17:25:59 +01:00
committed by GitHub
parent 06d411543a
commit 4db605f14a
2 changed files with 3 additions and 1 deletions

View File

@@ -6,7 +6,8 @@ function formatVmBackup(backup) {
let differencingVhds
let dynamicVhds
const withMemory = vmSnapshot.suspend_VDI !== 'OpaqueRef:NULL'
// some backups don't use snapshots, therefore cannot be with memory
const withMemory = vmSnapshot !== undefined && vmSnapshot.suspend_VDI !== 'OpaqueRef:NULL'
// isVhdDifferencing is either undefined or an object
if (isVhdDifferencing !== undefined) {
differencingVhds = Object.values(isVhdDifferencing).filter(t => t).length

View File

@@ -32,6 +32,7 @@
<!--packages-start-->
- @xen-orchestra/backups patch
- xo-web minor
<!--packages-end-->