From 6bd2f9f0623b876c67c1e426c09099eab7013c5f Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 16 Aug 2024 16:01:45 +0200 Subject: [PATCH] don't create connection to get default settings variant --- ayon_api/_api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ayon_api/_api.py b/ayon_api/_api.py index f0d6809b2..576a244b2 100644 --- a/ayon_api/_api.py +++ b/ayon_api/_api.py @@ -18,6 +18,9 @@ ) from .server_api import ServerAPI from .exceptions import FailedServiceInit +from .utils import ( + get_default_settings_variant as _get_default_settings_variant +) class GlobalServerAPI(ServerAPI): @@ -502,6 +505,8 @@ def get_default_settings_variant(): Union[str, None]: name of variant or None. """ + if not GlobalContext.is_connection_created(): + return _get_default_settings_variant() con = get_server_api_connection() return con.get_default_settings_variant()