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 @@ -186,7 +186,7 @@ async def item_collection(
186
186
Called with `GET /collections/{collection_id}/items`
187
187
188
188
Args:
189
- id : id of the collection.
189
+ collection_id : id of the collection.
190
190
limit: number of items to return.
191
191
token: pagination token.
192
192
Original file line number Diff line number Diff line change @@ -349,13 +349,14 @@ def post_search(
349
349
# Non-interval date ex. "2000-02-02T00:00:00.00Z"
350
350
if len (dts ) == 1 :
351
351
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 ["" , ".." ]:
353
354
query = query .filter (self .item_table .datetime .between (* dts ))
354
355
# All items after the start date
355
- elif dts [0 ] != " .." :
356
+ elif dts [0 ] not in [ "" , " .."] :
356
357
query = query .filter (self .item_table .datetime >= dts [0 ])
357
358
# All items before the end date
358
- elif dts [1 ] != " .." :
359
+ elif dts [1 ] not in [ "" , " .."] :
359
360
query = query .filter (self .item_table .datetime <= dts [1 ])
360
361
361
362
# Query fields
You can’t perform that action at this time.
0 commit comments