File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
pgstac/stac_fastapi/pgstac
sqlalchemy/stac_fastapi/sqlalchemy Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ async def item_collection(
184184 Called with `GET /collections/{collection_id}/items`
185185
186186 Args:
187- id : id of the collection.
187+ collection_id : id of the collection.
188188 limit: number of items to return.
189189 token: pagination token.
190190
Original file line number Diff line number Diff line change @@ -349,13 +349,14 @@ def post_search(
349349 # Non-interval date ex. "2000-02-02T00:00:00.00Z"
350350 if len (dts ) == 1 :
351351 query = query .filter (self .item_table .datetime == dts [0 ])
352- elif ".." not in search_request .datetime :
352+ # is there a benefit to between instead of >= and <= ?
353+ elif dts [0 ] not in ["" , ".." ] and dts [1 ] not in ["" , ".." ]:
353354 query = query .filter (self .item_table .datetime .between (* dts ))
354355 # All items after the start date
355- elif dts [0 ] != " .." :
356+ elif dts [0 ] not in [ "" , " .."] :
356357 query = query .filter (self .item_table .datetime >= dts [0 ])
357358 # All items before the end date
358- elif dts [1 ] != " .." :
359+ elif dts [1 ] not in [ "" , " .."] :
359360 query = query .filter (self .item_table .datetime <= dts [1 ])
360361
361362 # Query fields
You can’t perform that action at this time.
0 commit comments