From 6c9c3b7b14411a854c8dcf8583d56b314e45a4ce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Mar 2021 11:03:30 +0100 Subject: Fix emptying video tags --- server/controllers/api/videos/index.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 58ab72370..2447c1288 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts @@ -347,12 +347,13 @@ async function updateVideo (req: express.Request, res: express.Response) { if (previewModel) await videoInstanceUpdated.addAndSaveThumbnail(previewModel, t) // Video tags update? - await setVideoTags({ - video: videoInstanceUpdated, - tags: videoInfoToUpdate.tags, - transaction: t, - defaultValue: videoInstanceUpdated.Tags - }) + if (videoInfoToUpdate.tags !== undefined) { + await setVideoTags({ + video: videoInstanceUpdated, + tags: videoInfoToUpdate.tags, + transaction: t + }) + } // Video channel update? if (res.locals.videoChannel && videoInstanceUpdated.channelId !== res.locals.videoChannel.id) { -- cgit v1.2.3