Skip to content

Commit eb0a6dc

Browse files
authored
Merge pull request #8 from zweckj/204-exception
Fail on no content item update
2 parents d40af11 + 9d1d5de commit eb0a6dc

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

onedrive_personal_sdk/clients/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ async def download_drive_item(
8585

8686
async def update_drive_item(
8787
self, path_or_id: str, data: ItemUpdate
88-
) -> File | Folder | None:
88+
) -> File | Folder:
8989
"""Update items in a drive."""
9090
response = await self._request(
9191
HttpMethod.PATCH,
9292
f"{GRAPH_BASE_URL}/me/drive/items/{path_or_id}",
9393
json=data.to_dict(),
9494
)
9595
if response.status == 204:
96-
return None
96+
raise OneDriveException("Item update had no effect")
9797
json = await response.json()
9898
return self._dict_to_item(json)
9999

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "onedrive-personal-sdk"
3-
version = "0.0.15"
3+
version = "0.0.16"
44
license = {text = "MIT"}
55
description = "A package to interact with the Microsoft Graph API for personal OneDrives."
66
readme = "README.md"

0 commit comments

Comments
 (0)