Skip to content

Commit 45b4b96

Browse files
committed
provided mandatory fixes mentioned by Zaczero
1 parent c14529c commit 45b4b96

File tree

1 file changed

+4
-3
lines changed
  • stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers/filter

1 file changed

+4
-3
lines changed

stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers/filter/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class EsAsyncBaseFiltersClient(AsyncBaseFiltersClient):
2121
async def get_queryables(
2222
self, collection_id: Optional[str] = None, **kwargs
2323
) -> Dict[str, Any]:
24-
request: Optional[Request] = kwargs.get("request").url
2524
"""Get the queryables available for the given collection_id.
2625
2726
If collection_id is None, returns the intersection of all
@@ -39,9 +38,11 @@ async def get_queryables(
3938
Returns:
4039
Dict[str, Any]: A dictionary containing the queryables for the given collection.
4140
"""
41+
request: Optional[Request] = kwargs.get("request")
42+
url_str: Optional[str] = str(request.url) if request else ""
4243
queryables: Dict[str, Any] = {
43-
"$schema": "https://json-schema.org/draft-07/schema#",
44-
"$id": f"{request!s}",
44+
"$schema": "https://json-schema.org/draft-07/schema",
45+
"$id": f"{url_str}",
4546
"type": "object",
4647
"title": "Queryables for STAC API",
4748
"description": "Queryable names for the STAC API Item Search filter.",

0 commit comments

Comments
 (0)