mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
capture 'TaskNotSetError'
This commit is contained in:
parent
b995c51f1c
commit
5d91c9ba98
1 changed files with 18 additions and 10 deletions
|
|
@ -26,7 +26,7 @@ from ayon_core.pipeline import Anatomy
|
|||
from ayon_core.pipeline.version_start import get_versioning_start
|
||||
from ayon_core.pipeline.template_data import get_template_data
|
||||
from ayon_core.pipeline.publish import get_publish_template_name
|
||||
from ayon_core.pipeline.create import get_product_name
|
||||
from ayon_core.pipeline.create import get_product_name, TaskNotSetError
|
||||
|
||||
UNKNOWN = object()
|
||||
|
||||
|
|
@ -823,15 +823,23 @@ class ProjectPushItemProcess:
|
|||
task_name = task_info["name"]
|
||||
task_type = task_info["taskType"]
|
||||
|
||||
product_name = get_product_name(
|
||||
self._item.dst_project_name,
|
||||
task_name,
|
||||
task_type,
|
||||
self.host_name,
|
||||
product_type,
|
||||
self._item.variant,
|
||||
project_settings=self._project_settings
|
||||
)
|
||||
try:
|
||||
product_name = get_product_name(
|
||||
self._item.dst_project_name,
|
||||
task_name,
|
||||
task_type,
|
||||
self.host_name,
|
||||
product_type,
|
||||
self._item.variant,
|
||||
project_settings=self._project_settings
|
||||
)
|
||||
except TaskNotSetError:
|
||||
self._status.set_failed(
|
||||
"Product name template requires task name."
|
||||
" Please select target task to continue."
|
||||
)
|
||||
raise PushToProjectError(self._status.fail_reason)
|
||||
|
||||
self._log_info(
|
||||
f"Push will be integrating to product with name '{product_name}'"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue