Skip to content

Commit

Permalink
Merge pull request #174 from ynput/enhancement/better-settings-variant
Browse files Browse the repository at this point in the history
Settings variant: Don't create connection to get default settings variant
  • Loading branch information
iLLiCiTiT authored Sep 3, 2024
2 parents 19479f4 + 6bd2f9f commit dcfb95c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ayon_api/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit dcfb95c

Please sign in to comment.