Skip to content

Commit 02cd0df

Browse files
jacalataclaude
andauthored
Correct the get_by_id docstring: it sends a PUT (#1910)
get_by_id builds a ProjectItem with only the ID and calls update, so it sends PUT /projects/<id>. The docstring said it used the update endpoint without the ability to update the project, which is wrong. An empty update changed no fields in a live check, and the call needs permission to update the project. Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent a5a8c48 commit 02cd0df

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tableauserverclient/server/endpoint/projects_endpoint.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ def get_by_path(self, path: str) -> "ProjectItem | None":
164164
def get_by_id(self, project_id: str) -> ProjectItem:
165165
"""
166166
Fetch a project by ID. This is a convenience method making up for a gap in the server API.
167-
It uses the same endpoint as the update method, but without the ability to update the project.
167+
It sends the same request as the update method with no project details set, so it does not
168+
update the project. The request requires permission to update the project, so a user without
169+
that permission gets an error.
168170
"""
169171
if not project_id:
170172
error = "Project ID undefined."

0 commit comments

Comments
 (0)