Skip to content

Commit

Permalink
Merge pull request #199 from ynput/bugfix/missing-variable-in-create
Browse files Browse the repository at this point in the history
Create: Add missing variable 'task_name'
  • Loading branch information
iLLiCiTiT authored Mar 19, 2024
2 parents 11e89c1 + c020085 commit 74916e3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/ayon_core/pipeline/create/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1953,11 +1953,11 @@ def create(
"""Trigger create of plugins with standartized arguments.
Arguments 'folder_entity' and 'task_name' use current context as
default values. If only 'task_name' is provided it will be overriden
by task name from current context. If 'task_name' is not provided
when 'folder_entity' is, it is considered that task name is not
specified, which can lead to error if product name template requires
task name.
default values. If only 'task_entity' is provided it will be
overridden by task name from current context. If 'task_name' is not
provided when 'folder_entity' is, it is considered that task name is
not specified, which can lead to error if product name template
requires task name.
Args:
creator_identifier (str): Identifier of creator plugin.
Expand Down Expand Up @@ -1986,6 +1986,8 @@ def create(
raise CreatorError(
"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(
Expand Down

0 comments on commit 74916e3

Please sign in to comment.