From 2efd32f697549c59337db5177a93749af8e605d8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 May 2018 09:28:18 +0200 Subject: Fix updating video tags to empty field --- server/models/video/tag.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/models') 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 { Videos: VideoModel[] static findOrCreateTags (tags: string[], transaction: Transaction) { + if (tags === null) return [] + const tasks: Bluebird[] = [] tags.forEach(tag => { const query = { -- cgit v1.2.3