File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
sfeos_helpers/stac_fastapi/sfeos_helpers/database Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ dependencies = [
3535 " elasticsearch[async]~=8.19.1" ,
3636 " uvicorn~=0.23.0" ,
3737 " starlette>=0.35.0,<0.36.0" ,
38+ " redis==6.4.0" ,
3839]
3940
4041[project .urls ]
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ dependencies = [
3636 " opensearch-py[async]~=2.8.0" ,
3737 " uvicorn~=0.23.0" ,
3838 " starlette>=0.35.0,<0.36.0" ,
39+ " redis==6.4.0" ,
3940]
4041
4142[project .urls ]
Original file line number Diff line number Diff line change @@ -114,13 +114,13 @@ def parse_search_date(date_str: Optional[str]) -> Optional[date]:
114114 date_str = date_str .rstrip ("Z" )
115115 return datetime .fromisoformat (date_str ).date ()
116116
117- def check_criteria (value_begin : date , value_end : date , criteria : Dict ) -> bool :
117+ def check_criteria (value_begin : datetime , value_end : datetime , criteria : Dict ) -> bool :
118118 gte = parse_search_date (criteria .get ("gte" ))
119119 lte = parse_search_date (criteria .get ("lte" ))
120120
121- if gte and value_end < gte :
121+ if gte and value_end . date () < gte :
122122 return False
123- if lte and value_begin > lte :
123+ if lte and value_begin . date () > lte :
124124 return False
125125
126126 return True
You can’t perform that action at this time.
0 commit comments