mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added ability to pass curly brackets in templates as labels
This commit is contained in:
parent
6d1bbb6a12
commit
467a3969cb
1 changed files with 3 additions and 1 deletions
|
|
@ -114,6 +114,7 @@ def _fill_schema_template_data(
|
|||
|
||||
elif isinstance(template, STRING_TYPE):
|
||||
# TODO find much better way how to handle filling template data
|
||||
template = template.replace("{{", "__dbcb__").replace("}}", "__decb__")
|
||||
for replacement_string in template_key_pattern.findall(template):
|
||||
key = str(replacement_string[1:-1])
|
||||
required_keys.add(key)
|
||||
|
|
@ -129,7 +130,8 @@ def _fill_schema_template_data(
|
|||
else:
|
||||
# Only replace the key in string
|
||||
template = template.replace(replacement_string, value)
|
||||
output = template
|
||||
|
||||
output = template.replace("__dbcb__", "{").replace("__decb__", "}")
|
||||
|
||||
else:
|
||||
output = template
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue