mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +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.version_start import get_versioning_start
|
||||||
from ayon_core.pipeline.template_data import get_template_data
|
from ayon_core.pipeline.template_data import get_template_data
|
||||||
from ayon_core.pipeline.publish import get_publish_template_name
|
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()
|
UNKNOWN = object()
|
||||||
|
|
||||||
|
|
@ -823,15 +823,23 @@ class ProjectPushItemProcess:
|
||||||
task_name = task_info["name"]
|
task_name = task_info["name"]
|
||||||
task_type = task_info["taskType"]
|
task_type = task_info["taskType"]
|
||||||
|
|
||||||
product_name = get_product_name(
|
try:
|
||||||
self._item.dst_project_name,
|
product_name = get_product_name(
|
||||||
task_name,
|
self._item.dst_project_name,
|
||||||
task_type,
|
task_name,
|
||||||
self.host_name,
|
task_type,
|
||||||
product_type,
|
self.host_name,
|
||||||
self._item.variant,
|
product_type,
|
||||||
project_settings=self._project_settings
|
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(
|
self._log_info(
|
||||||
f"Push will be integrating to product with name '{product_name}'"
|
f"Push will be integrating to product with name '{product_name}'"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue