diff --git a/src/pynxtools/nomad/schema.py b/src/pynxtools/nomad/schema.py index 12f5a8980..22818ef15 100644 --- a/src/pynxtools/nomad/schema.py +++ b/src/pynxtools/nomad/schema.py @@ -616,8 +616,7 @@ def nexus_resolve_variadic_name( fitting_definitions = definitions if filter: fitting_definitions = {} - for def_name in definitions: - definition = definitions[def_name] + for def_name, definition in definitions.items(): if filter in definition.inherited_sections: fitting_definitions[def_name] = definition return resolve_variadic_name(fitting_definitions, name, hint)