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] 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