Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitlab/v4/objects/todos.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def mark_as_done(self, **kwargs: Any) -> Dict[str, Any]:
Returns:
A dict with the result
"""
path = f"{self.manager.path}/{self.id}/mark_as_done"
path = f"{self.manager.path}/{self.encoded_id}/mark_as_done"
server_data = self.manager.gitlab.http_post(path, **kwargs)
if TYPE_CHECKING:
assert isinstance(server_data, dict)
Expand Down
12 changes: 6 additions & 6 deletions gitlab/v4/objects/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def block(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
Returns:
Whether the user status has been changed
"""
path = f"/users/{self.id}/block"
path = f"/users/{self.encoded_id}/block"
server_data = self.manager.gitlab.http_post(path, **kwargs)
if server_data is True:
self._attrs["state"] = "blocked"
Expand All @@ -200,7 +200,7 @@ def follow(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
Returns:
The new object data (*not* a RESTObject)
"""
path = f"/users/{self.id}/follow"
path = f"/users/{self.encoded_id}/follow"
return self.manager.gitlab.http_post(path, **kwargs)

@cli.register_custom_action("User")
Expand All @@ -218,7 +218,7 @@ def unfollow(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
Returns:
The new object data (*not* a RESTObject)
"""
path = f"/users/{self.id}/unfollow"
path = f"/users/{self.encoded_id}/unfollow"
return self.manager.gitlab.http_post(path, **kwargs)

@cli.register_custom_action("User")
Expand All @@ -236,7 +236,7 @@ def unblock(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
Returns:
Whether the user status has been changed
"""
path = f"/users/{self.id}/unblock"
path = f"/users/{self.encoded_id}/unblock"
server_data = self.manager.gitlab.http_post(path, **kwargs)
if server_data is True:
self._attrs["state"] = "active"
Expand All @@ -257,7 +257,7 @@ def deactivate(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
Returns:
Whether the user status has been changed
"""
path = f"/users/{self.id}/deactivate"
path = f"/users/{self.encoded_id}/deactivate"
server_data = self.manager.gitlab.http_post(path, **kwargs)
if server_data:
self._attrs["state"] = "deactivated"
Expand All @@ -278,7 +278,7 @@ def activate(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
Returns:
Whether the user status has been changed
"""
path = f"/users/{self.id}/activate"
path = f"/users/{self.encoded_id}/activate"
server_data = self.manager.gitlab.http_post(path, **kwargs)
if server_data:
self._attrs["state"] = "active"
Expand Down