Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creators: fix undefined task name #480

Merged
merged 4 commits into from
May 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions client/ayon_core/pipeline/create/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1987,12 +1987,16 @@ def create(
"Folder '{}' was not found".format(folder_path)
)

task_name = None
if task_entity is None:
task_name = self.get_current_task_name()
task_entity = ayon_api.get_task_by_name(
project_name, folder_entity["id"], task_name
)
if task_name:
task_entity = ayon_api.get_task_by_name(
project_name, folder_entity["id"], task_name
)
iLLiCiTiT marked this conversation as resolved.
Show resolved Hide resolved

task_name = None
if task_entity:
task_name = task_entity["name"]
iLLiCiTiT marked this conversation as resolved.
Show resolved Hide resolved

if pre_create_data is None:
pre_create_data = {}
Expand Down Expand Up @@ -2022,6 +2026,7 @@ def create(
"productType": creator.product_type,
"variant": variant
}
print("Create instance data", instance_data)
iLLiCiTiT marked this conversation as resolved.
Show resolved Hide resolved
return creator.create(
product_name,
instance_data,
Expand Down
Loading