Commit affb8137 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed issue in normalizer order and workflow access.

parent eb51f1cb
Pipeline #93086 passed with stages
in 57 minutes and 52 seconds
......@@ -54,6 +54,6 @@ normalizers: Iterable[Type[Normalizer]] = [
# FhiAimsBaseNormalizer,
DosNormalizer,
BandStructureNormalizer,
EncyclopediaNormalizer,
WorkflowNormalizer,
EncyclopediaNormalizer,
]
......@@ -50,7 +50,7 @@ class EncyclopediaNormalizer(Normalizer):
# Primarily try to determine the calculation type from workflow
# information
try:
workflow = self.section_run.section_workflow
workflow = self.entry_archive.section_workflow
workflow_map = {
"molecular_dynamics": calc_enums.molecular_dynamics,
"geometry_optimization": calc_enums.geometry_optimization,
......@@ -58,8 +58,8 @@ class EncyclopediaNormalizer(Normalizer):
}
workflow_enum = workflow_map.get(workflow.workflow_type)
if workflow_enum is not None:
calc.calculation_type = calc_type
return calc_type
calc.calculation_type = workflow_enum
return workflow_enum
except Exception:
pass
......
......@@ -95,7 +95,7 @@ class SystemBasedNormalizer(Normalizer, metaclass=ABCMeta):
# Try to find workflow information and select the representative system
# based on it
workflow = self.section_run.section_workflow
workflow = self.entry_archive.section_workflow
if workflow:
try:
iscc = workflow.calculation_result_ref
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment