From bf913d177473a94123b28950ef5f9f897c60f9ad Mon Sep 17 00:00:00 2001 From: Sebastian Aranda Sanchez Date: Fri, 12 Jan 2024 11:36:47 -0300 Subject: [PATCH 1/2] Add missing `date_end` param to `edit_message` route --- src/narrativelog/routers/edit_message.py | 7 +++++++ tests/test_edit_message.py | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/narrativelog/routers/edit_message.py b/src/narrativelog/routers/edit_message.py index 84b2509..a1efe7c 100644 --- a/src/narrativelog/routers/edit_message.py +++ b/src/narrativelog/routers/edit_message.py @@ -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 @@ -148,6 +154,7 @@ async def edit_message( "urls", "time_lost", "date_begin", + "date_end", "site_id", "user_id", "user_agent", diff --git a/tests/test_edit_message.py b/tests/test_edit_message.py index e81a380..1b0ea0c 100644 --- a/tests/test_edit_message.py +++ b/tests/test_edit_message.py @@ -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, From 433109b352cba36a559baf8738bbe97c5bccff87 Mon Sep 17 00:00:00 2001 From: Sebastian Aranda Sanchez Date: Fri, 12 Jan 2024 11:41:31 -0300 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 13405c9..f48c9aa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,11 @@ Change Log ========== +0.6.1 +----- + +* Add missing ``date_end`` param to ``edit_message`` route. + 0.6.0 -----