Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Aug 1, 2024
1 parent f7f39db commit d07ee58
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions stac_fastapi/pgstac/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,9 @@ async def item_collection(

if self.extension_is_enabled("FilterExtension"):
filter_lang = kwargs.get("filter_lang", None)
filter = kwargs.get("filter", "").strip()

if len(filter) > 0 and filter_lang == "cql2-text":
ast = parse_cql2_text(filter)
filter = kwargs.get("filter", None)
if filter is not None and filter_lang == "cql2-text":
ast = parse_cql2_text(filter.strip())
base_args["filter"] = orjson.loads(to_cql2(ast))
base_args["filter-lang"] = "cql2-json"

Expand Down

0 comments on commit d07ee58

Please sign in to comment.