aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/tag.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/models/video/tag.ts b/server/models/video/tag.ts
index 0ae74d808..6d79a5575 100644
--- a/server/models/video/tag.ts
+++ b/server/models/video/tag.ts
@@ -37,6 +37,8 @@ export class TagModel extends Model<TagModel> {
37 Videos: VideoModel[] 37 Videos: VideoModel[]
38 38
39 static findOrCreateTags (tags: string[], transaction: Transaction) { 39 static findOrCreateTags (tags: string[], transaction: Transaction) {
40 if (tags === null) return []
41
40 const tasks: Bluebird<TagModel>[] = [] 42 const tasks: Bluebird<TagModel>[] = []
41 tags.forEach(tag => { 43 tags.forEach(tag => {
42 const query = { 44 const query = {