From a247921c2f77d5f3d59964b1a2b9503e93f74e7c Mon Sep 17 00:00:00 2001 From: IanCa Date: Thu, 25 May 2023 15:51:23 -0500 Subject: [PATCH 1/2] Don't add the inLibrary attribute if no withStandard partner --- hed/schema/hed_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hed/schema/hed_schema.py b/hed/schema/hed_schema.py index 5e94349b6..bcd93be8b 100644 --- a/hed/schema/hed_schema.py +++ b/hed/schema/hed_schema.py @@ -790,7 +790,7 @@ def _get_attributes_for_section(self, key_class): # =============================================== def _add_tag_to_dict(self, long_tag_name, new_entry, key_class): # No reason we can't add this here always - if self.library and not self.merged: + if self.library and not self.merged and self.with_standard: new_entry.set_attribute_value(HedKey.InLibrary, self.library) section = self._sections[key_class] From 045ee7fb0605c985f3f75a2d829ff378797e3d1d Mon Sep 17 00:00:00 2001 From: IanCa Date: Thu, 25 May 2023 15:58:36 -0500 Subject: [PATCH 2/2] Tweak another save merged spot --- hed/schema/schema_io/schema2base.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hed/schema/schema_io/schema2base.py b/hed/schema/schema_io/schema2base.py index 732e65b1b..bb5240134 100644 --- a/hed/schema/schema_io/schema2base.py +++ b/hed/schema/schema_io/schema2base.py @@ -34,11 +34,9 @@ def process_schema(self, hed_schema, save_merged=False): self._save_base = True else: # Saving a standard schema or a library schema without a standard schema - save_merged = False - if hed_schema.library: - self._save_lib = True - else: - self._save_base = True + save_merged = True + self._save_lib = True + self._save_base = True self._save_merged = save_merged