From 52d6c2e0bf0893e39d0a89fccebad684e9d61ce5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 10 Oct 2022 14:51:11 +0200 Subject: Fix video job error when video has been deleted --- server/models/video/video-job-info.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video-job-info.ts b/server/models/video/video-job-info.ts index 7497addf1..740f6b5c6 100644 --- a/server/models/video/video-job-info.ts +++ b/server/models/video/video-job-info.ts @@ -84,7 +84,7 @@ export class VideoJobInfoModel extends Model { const options = { type: QueryTypes.SELECT as QueryTypes.SELECT, bind: { videoUUID } } - const [ { pendingMove } ] = await VideoJobInfoModel.sequelize.query<{ pendingMove: number }>(` + const result = await VideoJobInfoModel.sequelize.query<{ pendingMove: number }>(` UPDATE "videoJobInfo" SET @@ -97,7 +97,9 @@ export class VideoJobInfoModel extends Model { -- cgit v1.2.3