Skip to content
Snippets Groups Projects
Commit dec5b96d authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

ENH: allow variable replacements in keys

parent f0ebf631
No related branches found
No related tags found
2 merge requests!53Release 0.1,!27ENH: allow variable replacements in keys
Pipeline #23879 passed with warnings
......@@ -143,6 +143,11 @@ def create_records(values: GeneralStore,
for key, value in record.items():
if key == "parents" or key == "role":
continue
# Allow replacing variables in keys / names of properties:
key_template = Template(key)
key = key_template.safe_substitute(**values.get_storage())
keys_modified.append((name, key))
propvalue, collection_mode = handle_value(value, values)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment