File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/aleph/web/controllers Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1414 LIST_FIELD_SEPARATOR ,
1515 Pagination ,
1616 cond_output ,
17+ make_date_filters ,
1718)
1819
1920LOGGER = logging .getLogger (__name__ )
@@ -175,6 +176,15 @@ class MessageQueryParams(BaseMessageQueryParams):
175176 "a time field lower than this value will be returned." ,
176177 )
177178
179+ def to_filter_list (self ) -> List [Mapping [str , Any ]]:
180+ filters = super ().to_filter_list ()
181+ date_filters = make_date_filters (
182+ start = self .start_date , end = self .end_date , filter_key = "time"
183+ )
184+ if date_filters :
185+ filters .append (date_filters )
186+ return filters
187+
178188
179189class WsMessageQueryParams (BaseMessageQueryParams ):
180190 history : Optional [int ] = Field (
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ async def fetch_messages_filter_time_expect_success(
171171@pytest .mark .asyncio
172172async def test_time_filters (fixture_messages , ccn_api_client ):
173173 # Start and end time specified, should return all messages
174- start_time , end_time = 164821580 , 1648215820
174+ start_time , end_time = 1648215900 , 1652126600
175175 messages = await fetch_messages_filter_time_expect_success (
176176 ccn_api_client , start = start_time , end = end_time
177177 )
You can’t perform that action at this time.
0 commit comments