Skip to content

Commit bca3851

Browse files
committed
Fix wm serializers
1 parent 2dcc7e8 commit bca3851

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ minversion = 3.7
33
log_cli=true
44
python_files = test_*.py
55
;pytest_plugins = ['pytest_profiling']
6-
;addopts = -n 6 --dist loadscope
6+
addopts = -n 6 --dist loadscope

src/superannotate/lib/core/serviceproviders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def create_project_categories(
167167
def list_users(
168168
self,
169169
body_query: Query,
170-
parent_entity: str = "Team",
170+
parent_entity: CustomFieldEntityEnum = CustomFieldEntityEnum.TEAM,
171171
chunk_size=100,
172172
project_id: int = None,
173173
include_custom_fields=False,

src/superannotate/lib/infrastructure/services/work_management.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,14 @@ def list_users(
318318
self,
319319
body_query: Query,
320320
chunk_size=100,
321-
parent_entity: str = "Team",
321+
parent_entity: CustomFieldEntityEnum = CustomFieldEntityEnum.TEAM,
322322
project_id: int = None,
323323
include_custom_fields=False,
324324
) -> WMUserListResponse:
325325
if include_custom_fields:
326326
url = self.URL_SEARCH_CUSTOM_ENTITIES
327327
else:
328-
if parent_entity == "Team":
328+
if parent_entity == CustomFieldEntityEnum.TEAM:
329329
url = self.URL_SEARCH_TEAM_USERS
330330
else:
331331
url = self.URL_SEARCH_PROJECT_USERS
@@ -344,7 +344,7 @@ def list_users(
344344
body_query=body_query,
345345
query_params={
346346
"entity": "Contributor",
347-
"parentEntity": parent_entity,
347+
"parentEntity": parent_entity.value,
348348
},
349349
headers={
350350
"x-sa-entity-context": entity_context,

0 commit comments

Comments
 (0)