Merge branch 'develop' into chore/cleanup_abstract_collect_render

This commit is contained in:
Roy Nieterau 2024-04-11 14:47:56 +02:00 committed by GitHub
commit 4b1b54732e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -1,6 +1,5 @@
import os
from ayon_core.lib import StringTemplate
from ayon_core.pipeline import (
registered_host,
get_current_context,
@ -111,8 +110,6 @@ class LoadWorkfile(plugin.Loader):
data["version"] = version
filename = StringTemplate.format_strict_template(
file_template, data
)
filename = work_template["file"].format_strict(data)
path = os.path.join(work_root, filename)
host.save_workfile(path)

View file

@ -94,8 +94,12 @@ def prepare_template_data(fill_pairs):
output = {}
for item in valid_items:
keys, value = item
upper_value = value.upper()
capitalized_value = _capitalize_value(value)
# Convert only string values
if isinstance(value, str):
upper_value = value.upper()
capitalized_value = _capitalize_value(value)
else:
upper_value = capitalized_value = value
first_key = keys.pop(0)
if not keys: