Skip to content

Commit

Permalink
remove filter-lang regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfisher-geo committed Aug 6, 2024
1 parent d08b09c commit 80525a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
8 changes: 0 additions & 8 deletions stac_fastapi/core/stac_fastapi/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,6 @@ async def get_search(
"query": orjson.loads(query) if query else query,
}

# this is borrowed from stac-fastapi-pgstac
# Kludgy fix because using factory does not allow alias for filter-lan
query_params = str(request.query_params)
if filter_lang is None:
match = re.search(r"filter-lang=([a-z0-9-]+)", query_params, re.IGNORECASE)
if match:
filter_lang = match.group(1)

if datetime:
base_args["datetime"] = self._format_datetime_range(datetime)

Expand Down
12 changes: 0 additions & 12 deletions stac_fastapi/core/stac_fastapi/core/extensions/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,6 @@ async def aggregate(
if datetime:
base_args["datetime"] = self._format_datetime_range(datetime)

# this is borrowed from stac-fastapi-pgstac
# Kludgy fix because using factory does not allow alias for filter-lang
# If the value is the default, check if the request is different.
query_params = str(request.query_params)
if filter_lang is None:
match = re.search(
r"filter-lang=([a-z0-9-]+)", query_params, re.IGNORECASE
)
if match:
filter_lang = match.group(1)
else:
filter_lang = "cql2-text"
if filter:
base_args["filter"] = self.get_filter(filter, filter_lang)
aggregate_request = EsAggregationExtensionPostRequest(**base_args)
Expand Down

0 comments on commit 80525a7

Please sign in to comment.