1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix emptying video tags

This commit is contained in:
Chocobozzz 2021-03-03 11:03:30 +01:00
parent 1ef447bd83
commit 6c9c3b7b14
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 15 additions and 18 deletions

View file

@ -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) {