kopia lustrzana https://github.com/wagtail/wagtail
Use doseq=True when re-encoding query params in set_query_params
Otherwise, the list of values will be stringified and then URL encoded, resulting in something like locale=%5B%27en%27%5D From parse_qs docs: Use the urllib.parse.urlencode() function (with the doseq parameter set to True) to convert such dictionaries into query strings.pull/11234/head
rodzic
7194b6c837
commit
4c057f0069
|
@ -68,5 +68,5 @@ def set_query_params(url: str, params: dict):
|
|||
querydict = parse_qs(query)
|
||||
querydict.update(params)
|
||||
querydict = {key: value for key, value in querydict.items() if value is not None}
|
||||
query = urlencode(querydict)
|
||||
query = urlencode(querydict, doseq=True)
|
||||
return urlunsplit((scheme, netloc, path, query, fragment))
|
||||
|
|
Ładowanie…
Reference in New Issue