From 1209945dbe0f43e4aeb1e0431c3227f980b256b4 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 22 Jan 2024 18:54:12 +0100 Subject: [PATCH] 'get_service_addon_settings' does support 'project_name' argument --- ayon_api/_api.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ayon_api/_api.py b/ayon_api/_api.py index a0374a08b..1675eb66a 100644 --- a/ayon_api/_api.py +++ b/ayon_api/_api.py @@ -235,12 +235,15 @@ def get_service_name(): return ServiceContext.service_name -def get_service_addon_settings(): +def get_service_addon_settings(project_name=None): """Addon settings of service which initialized service. Service context must be initialized to be able to use this function. Call 'init_service' on you service start to do so. + Args: + project_name (Optional[str]): Project name. + Returns: Dict[str, Any]: Addon settings. @@ -252,7 +255,9 @@ def get_service_addon_settings(): addon_version = get_service_addon_version() if addon_name is None or addon_version is None: raise ValueError("Service is not initialized") - return get_addon_settings(addon_name, addon_version) + return get_addon_settings( + addon_name, addon_version, project_name=project_name + ) def is_connection_created():