Skip to content

Commit cf312b3

Browse files
authored
Merge branch 'friday' into 1027_fix_logs_assign_items
2 parents b453be3 + f48a5d1 commit cf312b3

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/superannotate/lib/app/interface/base_interface.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, token: str = None, config_path: str = None):
3434
else:
3535
_token = os.environ.get("SA_TOKEN")
3636
if not _token:
37-
_toke, _host, _ssl_verify = self._retrieve_configs(
37+
_token, _host, _ssl_verify = self._retrieve_configs(
3838
constants.CONFIG_PATH
3939
)
4040
self._token, self._host = _token, _host
@@ -90,11 +90,14 @@ def __init__(self, function):
9090
def get_client(self):
9191
if not self._client:
9292
if BaseInterfaceFacade.REGISTRY:
93-
self._client = BaseInterfaceFacade.REGISTRY[-1]
93+
return BaseInterfaceFacade.REGISTRY[-1]
9494
else:
9595
from lib.app.interface.sdk_interface import SAClient
9696

97-
self._client = SAClient()
97+
try:
98+
return SAClient()
99+
except Exception:
100+
pass
98101
elif hasattr(self._client, "controller"):
99102
return self._client
100103

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class SAClient(BaseInterfaceFacade, metaclass=TrackableMeta):
6565
def __init__(
6666
self,
6767
token: str = None,
68-
config_path: str = constants.CONFIG_PATH,
68+
config_path: str = None,
6969
):
7070
super().__init__(token, config_path)
7171

tests/integration/items/test_set_annotation_statuses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_image_annotation_status_via_names(self):
6565

6666
def test_image_annotation_status_via_invalid_names(self):
6767
sa.attach_items(
68-
self.PROJECT_NAME, "InProgress", self.ATTACHMENT_LIST
68+
self.PROJECT_NAME, self.ATTACHMENT_LIST, "InProgress"
6969
)
7070
with self.assertRaisesRegexp(AppException, SetAnnotationStatues.ERROR_MESSAGE):
7171
sa.set_annotation_statuses(

0 commit comments

Comments
 (0)