aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index c07430e6c..bcf1eaee6 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -244,7 +244,7 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
244 244
245 video.VideoFiles = [ videoFile ] 245 video.VideoFiles = [ videoFile ]
246 246
247 if (videoInfo.tags) { 247 if (videoInfo.tags !== undefined) {
248 const tagInstances = await TagModel.findOrCreateTags(videoInfo.tags, t) 248 const tagInstances = await TagModel.findOrCreateTags(videoInfo.tags, t)
249 249
250 await video.$set('Tags', tagInstances, sequelizeOptions) 250 await video.$set('Tags', tagInstances, sequelizeOptions)
@@ -332,7 +332,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
332 const videoInstanceUpdated = await videoInstance.save(sequelizeOptions) 332 const videoInstanceUpdated = await videoInstance.save(sequelizeOptions)
333 333
334 // Video tags update? 334 // Video tags update?
335 if (videoInfoToUpdate.tags) { 335 if (videoInfoToUpdate.tags !== undefined) {
336 const tagInstances = await TagModel.findOrCreateTags(videoInfoToUpdate.tags, t) 336 const tagInstances = await TagModel.findOrCreateTags(videoInfoToUpdate.tags, t)
337 337
338 await videoInstanceUpdated.$set('Tags', tagInstances, sequelizeOptions) 338 await videoInstanceUpdated.$set('Tags', tagInstances, sequelizeOptions)