Commit a1cba853 authored by Markus Scheidgen's avatar Markus Scheidgen

Merge branch 'nomad-fair' of https://gitlab.mpcdf.mpg.de/nomad-lab/python-common into nomad-fair

parents 9909dc86 798abe0c
......@@ -65,6 +65,8 @@ class LocalBackend(object):
self.debug = debug
self.store = store
# metaInfoEnv.infoKinds.items() gives a dictionary with keys meta_info
# and the associated value a nomadcore.local_meta_info.InfoKindEl object.
for ikNames, ik in metaInfoEnv.infoKinds.items():
if ik.kindStr == "type_section":
parentS = list(metaInfoEnv.firstAncestorsByType(ik.name).get("type_section", [[]])[0])
......@@ -72,8 +74,10 @@ class LocalBackend(object):
self.sectionManagers[ik.name] = SectionManager(
metaInfo=ik,
parentSectionNames=parentS, debug=self.debug)
# We go through each key, value in the dictionary of meta infos
for ikNames, ik in metaInfoEnv.infoKinds.items():
if ik.kindStr == "type_document_content" or ik.kindStr == "type_dimension":
# Now we find out what the supersections are of this meta_info
superSectionNames = metaInfoEnv.firstAncestorsByType(ik.name).get("type_section", [[]])[0]
if not superSectionNames:
raise Exception("MetaInfo of conrete value %s is not in any superSection" % ik.name)
......
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