diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/index.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 79ca4699f..ca800a9a8 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -342,10 +342,12 @@ async function updateVideo (req: express.Request, res: express.Response) { | |||
342 | updateAt: videoInfoToUpdate.scheduleUpdate.updateAt, | 342 | updateAt: videoInfoToUpdate.scheduleUpdate.updateAt, |
343 | privacy: videoInfoToUpdate.scheduleUpdate.privacy || null | 343 | privacy: videoInfoToUpdate.scheduleUpdate.privacy || null |
344 | }, { transaction: t }) | 344 | }, { transaction: t }) |
345 | } else if (videoInfoToUpdate.scheduleUpdate === null) { | ||
346 | await ScheduleVideoUpdateModel.deleteByVideoId(videoInstanceUpdated.id, t) | ||
345 | } | 347 | } |
346 | 348 | ||
347 | const isNewVideo = wasPrivateVideo && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE | 349 | const isNewVideo = wasPrivateVideo && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE |
348 | await federateVideoIfNeeded(videoInstanceUpdated, isNewVideo) | 350 | await federateVideoIfNeeded(videoInstanceUpdated, isNewVideo, t) |
349 | }) | 351 | }) |
350 | 352 | ||
351 | logger.info('Video with name %s and uuid %s updated.', videoInstance.name, videoInstance.uuid) | 353 | logger.info('Video with name %s and uuid %s updated.', videoInstance.name, videoInstance.uuid) |