mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Change return of _check_src_folder_type
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
parent
f13a40aa73
commit
87f1d458b8
1 changed files with 12 additions and 14 deletions
|
|
@ -731,23 +731,21 @@ class ProjectPushItemProcess:
|
|||
folder_entity["path"] = "/".join([parent_path, folder_name])
|
||||
return folder_entity
|
||||
|
||||
def _check_src_folder_type(
|
||||
def _get_dst_folder_type(
|
||||
self,
|
||||
project_entity: Dict[str, Any],
|
||||
project_entity: dict[str, Any],
|
||||
src_folder_type: str
|
||||
):
|
||||
"""Confirm that folder type exists in destination project"""
|
||||
folder_types = [
|
||||
folder_type["name"].lower()
|
||||
for folder_type in project_entity["folderTypes"]
|
||||
]
|
||||
) -> str:
|
||||
"""Get new folder type."""
|
||||
for folder_type in project_entity["folderTypes"]:
|
||||
if folder_type["name"].lower() == src_folder_type.lower():
|
||||
return folder_type["name"]
|
||||
|
||||
if src_folder_type.lower() not in folder_types:
|
||||
self._status.set_failed(
|
||||
f"'{src_folder_type}' folder type is not configured in "
|
||||
f"project Anatomy."
|
||||
)
|
||||
raise PushToProjectError(self._status.fail_reason)
|
||||
self._status.set_failed(
|
||||
f"'{src_folder_type}' folder type is not configured in "
|
||||
f"project Anatomy."
|
||||
)
|
||||
raise PushToProjectError(self._status.fail_reason)
|
||||
|
||||
def _fill_or_create_destination_folder(self):
|
||||
dst_project_name = self._item.dst_project_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue