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
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## Upgrading

- The `Dispatch` class is now a frozen dataclass, meaning that it is immutable. Modifications can still be done using `replace`: `dispatch = replace(dispatch, start_time=new_start_time)`.
- The `Client.update()` method now requires named parameters.

## New Features

Expand Down
1 change: 1 addition & 0 deletions src/frequenz/client/dispatch/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ async def create(

async def update(
self,
*,
dispatch_id: int,
new_fields: dict[str, Any],
) -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dispatch_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def test_update_dispatch() -> None:
sample = _update(sample, dispatch)
assert dispatch == sample

await client.update(dispatch.id, {"recurrence.interval": 4})
await client.update(dispatch_id=dispatch.id, new_fields={"recurrence.interval": 4})
assert client.dispatches[0].recurrence.interval == 4


Expand Down