fix(xo-server/importVmBackupNg): set result when restoring via XO Proxy (#7026)

This commit is contained in:
Julien Fontanet
2023-09-10 18:32:34 +02:00
committed by GitHub
parent 1c9d1049e0
commit 0104649b84
3 changed files with 5 additions and 1 deletions

View File

@@ -13,6 +13,8 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Backup/Restore] Fix `Cannot read properties of undefined (reading 'id')` error when restoring via an XO Proxy (PR [#7026](https://github.com/vatesfr/xen-orchestra/pull/7026))
### Packages to release
> When modifying a package, add it here with its release type.
@@ -29,6 +31,7 @@
<!--packages-start-->
- xo-server patch
- xo-server-netbox minor
<!--packages-end-->

View File

@@ -41,7 +41,7 @@ function forwardResult(log) {
// it records logs generated by `@xen-orchestra/backups/Task#run`
export const handleBackupLog = (
log,
{ vmBackupInfo, app, jobName, logger, localTaskIds, rootTaskId, runJobId = rootTaskId, handleRootTaskId }
{ vmBackupInfo, app, jobName, logger, localTaskIds, rootTaskId, runJobId, handleRootTaskId }
) => {
const { event, message, parentId, taskId } = log

View File

@@ -496,6 +496,7 @@ export default class BackupNg {
this._runningRestores.add(id)
rootTaskId = id
},
rootTaskId,
})
}
} catch (error) {