Skip to content

Commit 3db7c07

Browse files
committed
fix: update update_project_owner method to accept a dict instead of Project model
1 parent 0e3f3a3 commit 3db7c07

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

rapyuta_io_sdk_v2/client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def delete_project(self, project_guid: str, **kwargs) -> None:
392392
return None
393393

394394
def update_project_owner(
395-
self, body: Project | dict, project_guid: str = None, **kwargs
395+
self, body: dict, project_guid: str = None, **kwargs
396396
) -> dict[str, Any]:
397397
"""Update the owner of a project by its GUID.
398398
@@ -401,13 +401,10 @@ def update_project_owner(
401401
"""
402402
project_guid = project_guid or self.config.project_guid
403403

404-
if isinstance(body, dict):
405-
body = Project.model_validate(body)
406-
407404
result = self.c.put(
408405
url=f"{self.v2api_host}/v2/projects/{project_guid}/owner/",
409406
headers=self.config.get_headers(**kwargs),
410-
json=body.model_dump(),
407+
json=body,
411408
)
412409
handle_server_errors(result)
413410
return result

0 commit comments

Comments
 (0)