Skip to content

Commit 0206c31

Browse files
authored
Merge pull request #524 from superannotateai/1472_assign_folder
1472 assign folder
2 parents 955831a + e97c847 commit 0206c31

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -795,13 +795,18 @@ 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, include_contributors=True
804804
)
805+
806+
if response.errors:
807+
raise AppException(response.errors)
808+
809+
contributors = response.data.users
805810
verified_users = [i["user_id"] for i in contributors]
806811
verified_users = set(users).intersection(set(verified_users))
807812
unverified_contributor = set(users) - verified_users

0 commit comments

Comments
 (0)