Added tagById validation if node is a tag

This commit is contained in:
suneet.gupta
2023-02-08 18:14:43 +05:30
parent adcf1c526e
commit ce12c9e1e7

View File

@@ -196,6 +196,11 @@ public class TagsImpl implements Tags
{
NodeRef tagNodeRef = nodes.validateNode(storeRef, tagId);
if(tagNodeRef == null)
{
throw new EntityNotFoundException(tagId);
}
String tag = taggingService.getTagName(tagNodeRef);
if(!taggingService.isTag(storeRef,tag))
{
throw new EntityNotFoundException(tagId);
}