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 @@ -33,6 +33,7 @@ dependencies = [
3333 " elasticsearch[async]~=8.19.1" ,
3434 " uvicorn~=0.23.0" ,
3535 " starlette>=0.35.0,<0.36.0" ,
36+ " redis==6.4.0" ,
3637]
3738
3839[project .urls ]
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ dependencies = [
3434 " opensearch-py[async]~=2.8.0" ,
3535 " uvicorn~=0.23.0" ,
3636 " starlette>=0.35.0,<0.36.0" ,
37+ " redis==6.4.0" ,
3738]
3839
3940[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