diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-16 09:28:18 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-16 09:42:56 +0200 |
commit | 2efd32f697549c59337db5177a93749af8e605d8 (patch) | |
tree | 42adaa4bb67b6aa48dcd4fb660616fb37b611573 /server/models/video | |
parent | 17c49e60b367868c80f44b9921793dc3a2d9adaa (diff) | |
download | PeerTube-2efd32f697549c59337db5177a93749af8e605d8.tar.gz PeerTube-2efd32f697549c59337db5177a93749af8e605d8.tar.zst PeerTube-2efd32f697549c59337db5177a93749af8e605d8.zip |
Fix updating video tags to empty field
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/tag.ts | 2 |
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 = { |