From 8a5a078c29eaefbd08358d7f7b3bea41cb0cb0e5 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:50:37 +0200 Subject: [PATCH] use 'get_server_api_connection' to get connection --- client/ayon_core/cli_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/cli_commands.py b/client/ayon_core/cli_commands.py index c56ed16f1c..ca0693db2f 100644 --- a/client/ayon_core/cli_commands.py +++ b/client/ayon_core/cli_commands.py @@ -94,8 +94,9 @@ class Commands: # NOTE: ayon-python-api does not have public api function to find # out if is used service user. So we need to have try > except # block. + con = ayon_api.get_server_api_connection() try: - ayon_api.set_default_service_username(username) + con.set_default_service_username(username) except ValueError: pass