From ed3d59044d925d4012a7bbd47a0239e6887c1124 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 28 Apr 2022 13:19:21 +0700 Subject: [PATCH] Fix skill reference delete (#1577) Signed-off-by: Andrey Sobolev --- server-plugins/tags-resources/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-plugins/tags-resources/src/index.ts b/server-plugins/tags-resources/src/index.ts index c6a3903f32..d3b8813397 100644 --- a/server-plugins/tags-resources/src/index.ts +++ b/server-plugins/tags-resources/src/index.ts @@ -20,7 +20,7 @@ import tags, { TagElement } from '@anticrm/tags' * @public */ export async function TagElementRemove (doc: Doc, hiearachy: Hierarchy, findAll: (clazz: Ref>, query: DocumentQuery, options?: FindOptions) => Promise>): Promise { - if (hiearachy.isDerived(doc._class, tags.class.TagElement)) return [] + if (!hiearachy.isDerived(doc._class, tags.class.TagElement)) return [] return await findAll(tags.class.TagReference, { tag: doc._id as Ref }) }