Skip to content

Commit

Permalink
fix basesection name normalisation which caused missing entries from …
Browse files Browse the repository at this point in the history
…the workflow graph
  • Loading branch information
sanbrock committed Dec 13, 2024
1 parent fe1e8fd commit 657fbae
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/pynxtools/nomad/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,10 +951,9 @@ def normalize_sample_component(self, archive, logger):
def normalize_sample(self, archive, logger):
"""Normalizer for sample section."""
current_cls = __section_definitions[__rename_nx_for_nomad("NXsample")].section_cls
if self.name__field:
self.name = self.name__field
else:
self.name = self.__dict__["nx_name"]
self.name = self.__dict__["nx_name"] + (
"(" + self.name__field + ")" if self.name__field else ""
)
# one could also copy local ids to identifier for search purposes
super(current_cls, self).normalize(archive, logger)

Expand All @@ -964,10 +963,9 @@ def normalize_entry(self, archive, logger):
current_cls = __section_definitions[__rename_nx_for_nomad("NXentry")].section_cls
if self.start_time__field:
self.start_time = self.start_time__field
if self.title__field is not None:
self.name = self.title__field
else:
self.name = self.__dict__["nx_name"]
self.name = self.__dict__["nx_name"] + (
"(" + self.title__field + ")" if self.title__field is not None else ""
)
# one could also copy local ids to identifier for search purposes
super(current_cls, self).normalize(archive, logger)

Expand Down

0 comments on commit 657fbae

Please sign in to comment.