aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-16 09:28:18 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 09:42:56 +0200
commit2efd32f697549c59337db5177a93749af8e605d8 (patch)
tree42adaa4bb67b6aa48dcd4fb660616fb37b611573 /server/models
parent17c49e60b367868c80f44b9921793dc3a2d9adaa (diff)
downloadPeerTube-2efd32f697549c59337db5177a93749af8e605d8.tar.gz
PeerTube-2efd32f697549c59337db5177a93749af8e605d8.tar.zst
PeerTube-2efd32f697549c59337db5177a93749af8e605d8.zip
Fix updating video tags to empty field
Diffstat (limited to 'server/models')
-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 = {