diff options
author | Chocobozzz <me@florianbigard.com> | 2021-03-03 11:03:30 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-03-03 11:03:30 +0100 |
commit | 6c9c3b7b14411a854c8dcf8583d56b314e45a4ce (patch) | |
tree | afc86f88b33a4ad79a0d6e61a049e3693a44df23 /server/controllers/api | |
parent | 1ef447bd8397792dc7d1db93dfe87749f0532c72 (diff) | |
download | PeerTube-6c9c3b7b14411a854c8dcf8583d56b314e45a4ce.tar.gz PeerTube-6c9c3b7b14411a854c8dcf8583d56b314e45a4ce.tar.zst PeerTube-6c9c3b7b14411a854c8dcf8583d56b314e45a4ce.zip |
Fix emptying video tags
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/index.ts | 13 |
1 files changed, 7 insertions, 6 deletions
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) { | |||
347 | if (previewModel) await videoInstanceUpdated.addAndSaveThumbnail(previewModel, t) | 347 | if (previewModel) await videoInstanceUpdated.addAndSaveThumbnail(previewModel, t) |
348 | 348 | ||
349 | // Video tags update? | 349 | // Video tags update? |
350 | await setVideoTags({ | 350 | if (videoInfoToUpdate.tags !== undefined) { |
351 | video: videoInstanceUpdated, | 351 | await setVideoTags({ |
352 | tags: videoInfoToUpdate.tags, | 352 | video: videoInstanceUpdated, |
353 | transaction: t, | 353 | tags: videoInfoToUpdate.tags, |
354 | defaultValue: videoInstanceUpdated.Tags | 354 | transaction: t |
355 | }) | 355 | }) |
356 | } | ||
356 | 357 | ||
357 | // Video channel update? | 358 | // Video channel update? |
358 | if (res.locals.videoChannel && videoInstanceUpdated.channelId !== res.locals.videoChannel.id) { | 359 | if (res.locals.videoChannel && videoInstanceUpdated.channelId !== res.locals.videoChannel.id) { |