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..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 @@ -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,18 @@ 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"}, ) + # TODO add requirement for AYON launcher 1.4.3 when removed + 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 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", }