fix(xo-server/jobs): don't throw when the job owner doesn't exist (#5405)

Introduced by 31b19725b7
This commit is contained in:
badrAZ 2020-11-27 16:11:48 +01:00 committed by GitHub
parent 89b162704c
commit 214dbafd62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -27,3 +27,5 @@
> - major: if the change breaks compatibility > - major: if the change breaks compatibility
> >
> In case of conflict, the highest (lowest in previous list) `$version` wins. > In case of conflict, the highest (lowest in previous list) `$version` wins.
- xo-server patch

View File

@ -263,7 +263,11 @@ export default class Jobs {
}) })
const app = this._app const app = this._app
const user = await app.getUser(job.userId) const user = await app.getUser(job.userId).catch(error => {
if (!noSuchObject.is(error)) {
throw error
}
})
const data = { const data = {
callId: Math.random().toString(36).slice(2), callId: Math.random().toString(36).slice(2),
method: 'backupNg.runJob', method: 'backupNg.runJob',