mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
Fix skill reference delete (#1577)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
45108b4657
commit
ed3d59044d
@ -20,7 +20,7 @@ import tags, { TagElement } from '@anticrm/tags'
|
||||
* @public
|
||||
*/
|
||||
export async function TagElementRemove (doc: Doc, hiearachy: Hierarchy, findAll: <T extends Doc> (clazz: Ref<Class<T>>, query: DocumentQuery<T>, options?: FindOptions<T>) => Promise<FindResult<T>>): Promise<Doc[]> {
|
||||
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<TagElement> })
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user