mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
change task type before optional keys filling
This commit is contained in:
parent
7a5a0a5168
commit
6eecf8e759
1 changed files with 8 additions and 7 deletions
|
|
@ -1010,6 +1010,14 @@ class Templates:
|
|||
TemplateResult: Filled or partially filled template containing all
|
||||
data needed or missing for filling template.
|
||||
"""
|
||||
task_data = data.get("task")
|
||||
if (
|
||||
isinstance(task_data, StringType)
|
||||
and "{task[name]}" in orig_template
|
||||
):
|
||||
# Change task to dictionary if template expect dictionary
|
||||
data["task"] = {"name": task_data}
|
||||
|
||||
template, missing_optional, invalid_optional = (
|
||||
self._filter_optional(orig_template, data)
|
||||
)
|
||||
|
|
@ -1019,13 +1027,6 @@ class Templates:
|
|||
missing_required = []
|
||||
replace_keys = []
|
||||
|
||||
task_data = data.get("task")
|
||||
if (
|
||||
isinstance(task_data, StringType)
|
||||
and "{task[name]}" in orig_template
|
||||
):
|
||||
data["task"] = {"name": task_data}
|
||||
|
||||
for group in self.key_pattern.findall(template):
|
||||
orig_key = group[1:-1]
|
||||
key = str(orig_key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue