Skip to content

Commit 53dea14

Browse files
authored
Merge pull request #234 from MerginMaps/project_id_type
Fix `project_id` type
2 parents 2b06dfe + 7a4fe46 commit 53dea14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mergin/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,14 +1328,14 @@ def remove_workspace_member(self, workspace_id: int, user_id: int):
13281328
"""
13291329
self.delete(f"v2/workspaces/{workspace_id}/members/{user_id}")
13301330

1331-
def list_project_collaborators(self, project_id: int) -> List[dict]:
1331+
def list_project_collaborators(self, project_id: str) -> List[dict]:
13321332
"""
13331333
Get a list of project collaborators
13341334
"""
13351335
project_collaborators = self.get(f"v2/projects/{project_id}/collaborators")
13361336
return json.load(project_collaborators)
13371337

1338-
def add_project_collaborator(self, project_id: int, user: str, project_role: ProjectRole) -> dict:
1338+
def add_project_collaborator(self, project_id: str, user: str, project_role: ProjectRole) -> dict:
13391339
"""
13401340
Add a user to project collaborators and grant them a project role.
13411341
Fails if user is already a member of the project.
@@ -1346,7 +1346,7 @@ def add_project_collaborator(self, project_id: int, user: str, project_role: Pro
13461346
project_collaborator = self.post(f"v2/projects/{project_id}/collaborators", params, json_headers)
13471347
return json.load(project_collaborator)
13481348

1349-
def update_project_collaborator(self, project_id: int, user_id: int, project_role: ProjectRole) -> dict:
1349+
def update_project_collaborator(self, project_id: str, user_id: int, project_role: ProjectRole) -> dict:
13501350
"""
13511351
Update project role of the existing project collaborator.
13521352
Fails if user is not a member of the project yet.
@@ -1355,7 +1355,7 @@ def update_project_collaborator(self, project_id: int, user_id: int, project_rol
13551355
project_collaborator = self.patch(f"v2/projects/{project_id}/collaborators/{user_id}", params, json_headers)
13561356
return json.load(project_collaborator)
13571357

1358-
def remove_project_collaborator(self, project_id: int, user_id: int):
1358+
def remove_project_collaborator(self, project_id: str, user_id: int):
13591359
"""
13601360
Remove a user from project collaborators
13611361
"""

0 commit comments

Comments
 (0)