Skip to content
Snippets Groups Projects
Commit e676caee authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Merge branch 'f-key-variables' into 'dev'

ENH: allow variable replacements in keys

See merge request !27
parents 14988bec dec5b96d
No related branches found
No related tags found
2 merge requests!53Release 0.1,!27ENH: allow variable replacements in keys
Pipeline #26250 passed with warnings
...@@ -164,6 +164,11 @@ def create_records(values: GeneralStore, ...@@ -164,6 +164,11 @@ def create_records(values: GeneralStore,
for key, value in record.items(): for key, value in record.items():
if key == "parents" or key == "role": if key == "parents" or key == "role":
continue 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)) keys_modified.append((name, key))
propvalue, collection_mode = handle_value(value, values) 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