From 6565a3494ad39ebcc62987c45a21966685d71a41 Mon Sep 17 00:00:00 2001 From: IanCa Date: Mon, 25 Mar 2024 13:08:15 -0500 Subject: [PATCH] Fix check if that should be top level when writing --- hed/schema/schema_io/schema2base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hed/schema/schema_io/schema2base.py b/hed/schema/schema_io/schema2base.py index c54e9b97..bcdcd992 100644 --- a/hed/schema/schema_io/schema2base.py +++ b/hed/schema/schema_io/schema2base.py @@ -92,7 +92,8 @@ def _output_tags(self, tags): tag = tag_entry.name level = tag.count("/") - if not tag_entry.has_attribute(HedKey.InLibrary): + # Don't adjust if we're a top level tag(if this is a rooted tag, it will be re-adjusted below) + if not tag_entry.parent_name: level_adj = 0 if level == 0: root_tag = self._write_tag_entry(tag_entry, schema_node, level)