Skip to content

Commit

Permalink
Merge pull request #480 from ynput/bugfix/fix-creator-task-name
Browse files Browse the repository at this point in the history
Creators: fix undefined task name
  • Loading branch information
antirotor authored May 6, 2024
2 parents 1d9f63a + 86c1787 commit d592e56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/ayon_core/pipeline/create/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1987,12 +1987,12 @@ 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
)
current_task_name = self.get_current_task_name()
if current_task_name:
task_entity = ayon_api.get_task_by_name(
project_name, folder_entity["id"], current_task_name
)

if pre_create_data is None:
pre_create_data = {}
Expand All @@ -2018,7 +2018,7 @@ def create(

instance_data = {
"folderPath": folder_entity["path"],
"task": task_name,
"task": task_entity["name"] if task_entity else None,
"productType": creator.product_type,
"variant": variant
}
Expand Down

0 comments on commit d592e56

Please sign in to comment.