Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-42453: Add missing date_end param to edit_message route #25

Merged
merged 2 commits into from
Jan 12, 2024
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
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Change Log
==========

0.6.1
-----

* Add missing ``date_end`` param to ``edit_message`` route.

0.6.0
-----

Expand Down
7 changes: 7 additions & 0 deletions src/narrativelog/routers/edit_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ async def edit_message(
description="Approximate initial TAI date at which this message is relevant "
"(if different than the time at which the message was specified)",
),
date_end: None
| datetime.datetime = fastapi.Body(
default=None,
description="Approximate final TAI date at which this message is relevant "
"(if different than the time at which the message was specified)",
),
site_id: None | str = fastapi.Body(default=None, description="Site ID"),
user_id: None | str = fastapi.Body(default=None, description="User ID"),
user_agent: None
Expand Down Expand Up @@ -148,6 +154,7 @@ async def edit_message(
"urls",
"time_lost",
"date_begin",
"date_end",
"site_id",
"user_id",
"user_agent",
Expand Down
2 changes: 2 additions & 0 deletions tests/test_edit_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ async def test_edit_message(self) -> None:
],
category="New category",
time_lost_type=random.choice(["fault", "weather"]),
date_begin="2024-01-01T00:00:00",
date_end="2024-01-01T00:00:00",
)
# Repeatedly edit the old message. Each time
# add a new version of the message with one field omitted,
Expand Down
Loading