|
18 | 18 | """link helpers.""" |
19 | 19 |
|
20 | 20 | from typing import Any, Optional |
21 | | -from urllib.parse import ParseResult, parse_qs, unquote, urlencode, urljoin, urlparse |
| 21 | +from urllib.parse import ParseResult, parse_qs, quote, unquote, urlencode, urljoin, urlparse |
22 | 22 |
|
23 | 23 | import attr |
24 | 24 | import orjson |
|
28 | 28 | from starlette.requests import Request |
29 | 29 |
|
30 | 30 | from eodag.utils import update_nested_dict |
31 | | -from urllib.parse import quote |
| 31 | + |
32 | 32 | # These can be inferred from the item/collection so they aren't included in the database |
33 | 33 | # Instead they are dynamically generated when querying the database using the classes defined below |
34 | 34 | INFERRED_LINK_RELS = ["self", "item", "collection"] |
@@ -164,11 +164,11 @@ def link_next(self) -> Optional[dict[str, Any]]: |
164 | 164 |
|
165 | 165 | if method == "GET": |
166 | 166 | params = {"token": [str(self.next)]} |
167 | | - existing_query={} |
| 167 | + existing_query = {} |
168 | 168 | if "query" in self.request.query_params: |
169 | 169 | existing_query = orjson.loads(self.request.query_params["query"]) |
170 | 170 | combined_query = {**existing_query, **federation_filter.get("query", {})} |
171 | | - query_json = orjson.dumps(combined_query).decode() |
| 171 | + query_json = orjson.dumps(combined_query).decode() |
172 | 172 | params["query"] = [quote(query_json)] |
173 | 173 | # params["query"] = [orjson.dumps(combined_query)] |
174 | 174 | link["href"] = merge_params(self.url, params) |
|
0 commit comments