Skip to content

Commit b40eb65

Browse files
committed
fix getting project
1 parent 9a86a73 commit b40eb65

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -795,13 +795,19 @@ def assign_folder(
795795
:type users: list of str
796796
"""
797797

798-
contributors = (
799-
self.controller.projects.get_by_name(
800-
project_name=project_name, include_contributors=True
801-
)
802-
.data["project"]
803-
.users
798+
response = self.controller.projects.get_by_name(name=project_name)
799+
if response.errors:
800+
raise AppException(response.errors)
801+
project = response.data
802+
response = self.controller.projects.get_metadata(
803+
project = project,
804+
include_contributors = True
804805
)
806+
807+
if response.errors:
808+
raise AppException(response.errors)
809+
810+
contributors=response.data.users
805811
verified_users = [i["user_id"] for i in contributors]
806812
verified_users = set(users).intersection(set(verified_users))
807813
unverified_contributor = set(users) - verified_users

0 commit comments

Comments
 (0)