From 949a0791f3d8f521c21a9894cb783dc9f52b4400 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue, 27 Jan 2026 12:19:42 +0100 Subject: [PATCH 1/3] use product base types to fetch products --- .../pre_copy_last_published_workfile.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py b/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py index 7734585..77eb5a3 100644 --- a/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py +++ b/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py @@ -7,6 +7,7 @@ get_last_versions ) +from ayon_core.lib import is_func_signature_supported from ayon_core.pipeline.template_data import get_template_data from ayon_core.pipeline.workfile import get_workfile_template_key from ayon_core.pipeline.workfile import should_use_last_workfile_on_launch @@ -187,11 +188,17 @@ def _get_last_published_workfile_representation(self, ): """Looks for last published representation for host and context""" - product_entities = get_products( - project_name, + kwargs = dict( folder_ids={folder_id}, - product_types={"workfile"} + product_base_types={"workfile"}, ) + if not is_func_signature_supported( + get_products, project_name, **kwargs + ): + kwargs["product_types"] = kwargs.pop("product_base_types") + + product_entities = get_products(project_name, **kwargs) + product_ids = { product_entity["id"] for product_entity in product_entities From 92f589f3ebf524b4726222580a69b4c8face444d Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 29 Jan 2026 11:29:09 +0100 Subject: [PATCH 2/3] add comment --- .../launch_hooks/pre_copy_last_published_workfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py b/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py index 77eb5a3..cbbe0a2 100644 --- a/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py +++ b/client/ayon_sitesync/launch_hooks/pre_copy_last_published_workfile.py @@ -192,6 +192,7 @@ def _get_last_published_workfile_representation(self, folder_ids={folder_id}, product_base_types={"workfile"}, ) + # TODO add requirement for AYON launcher 1.4.3 when removed if not is_func_signature_supported( get_products, project_name, **kwargs ): From c0c4b1c9265f083c5455c5fef3e8b51d8db9c0ca Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 24 Apr 2026 11:56:26 +0200 Subject: [PATCH 3/3] specify compatible launcher --- package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/package.py b/package.py index 24b3f1d..7910feb 100644 --- a/package.py +++ b/package.py @@ -5,6 +5,7 @@ version = "1.2.5+dev" client_dir = "ayon_sitesync" +ayon_launcher_version = ">=1.4.3" ayon_required_addons = { "core": ">=0.3.0", }