mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
♻️ refactor var name and the logic a little bit
This commit is contained in:
parent
54368c51a9
commit
d6ae1db1b6
1 changed files with 4 additions and 9 deletions
|
|
@ -1988,16 +1988,12 @@ class CreateContext:
|
|||
)
|
||||
|
||||
if task_entity is None:
|
||||
task_name = self.get_current_task_name()
|
||||
if 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"], task_name
|
||||
project_name, folder_entity["id"], current_task_name
|
||||
)
|
||||
|
||||
task_name = None
|
||||
if task_entity:
|
||||
task_name = task_entity["name"]
|
||||
|
||||
if pre_create_data is None:
|
||||
pre_create_data = {}
|
||||
|
||||
|
|
@ -2022,11 +2018,10 @@ class CreateContext:
|
|||
|
||||
instance_data = {
|
||||
"folderPath": folder_entity["path"],
|
||||
"task": task_name,
|
||||
"task": task_entity["name"] if task_entity else None,
|
||||
"productType": creator.product_type,
|
||||
"variant": variant
|
||||
}
|
||||
print("Create instance data", instance_data)
|
||||
return creator.create(
|
||||
product_name,
|
||||
instance_data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue