fix(xo-web/tasks): tasks with no bound objects not displayed (#6315)

See https://xcp-ng.org/forum/topic/6038/not-seeing-tasks-any-more-as-admin
Introduced by dae37c6a50
This commit is contained in:
rajaa-b 2022-07-06 10:52:37 +02:00 committed by GitHub
parent ba03a48498
commit e246c8ee47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -13,6 +13,8 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Tasks] Fix tasks not displayed when running CR backup job [Forum#6038](https://xcp-ng.org/forum/topic/6038/not-seeing-tasks-any-more-as-admin) (PR [#6315](https://github.com/vatesfr/xen-orchestra/pull/6315))
### Packages to release
> When modifying a package, add it here with its release type.

View File

@ -638,11 +638,10 @@ export const getResolvedPendingTasks = create(
// { taskId → operation } map instead of { taskRef → operation } map
...defined(linkedObjectsByTaskRefOrId[task.id], []),
]
objects.length > 0 &&
resolvedTasks.push({
...task,
objects,
})
resolvedTasks.push({
...task,
objects,
})
})
return resolvedTasks
}