villebro commented on code in PR #24160:
URL: https://github.com/apache/superset/pull/24160#discussion_r1199738298
##########
superset/views/core.py:
##########
@@ -1959,7 +1959,7 @@ def dashboard_permalink( # pylint: disable=no-self-use
dashboard_id, state = value["dashboardId"], value.get("state", {})
url = f"/superset/dashboard/{dashboard_id}?permalink_key={key}"
if url_params := state.get("urlParams"):
- params = parse.urlencode(url_params)
+ params = parse.urlencode(dict(url_params))
Review Comment:
The reason we want to keep it as a list/tuple of tuples is because url
params can contain duplicate keys (this would be lost is it were converted to a
`dict`). I believe this may be a regression from #23888 , which has lost some
context on tuples, which has caused them to become lists, which isn't
compatible with `urlencode`.
I think the correct solution is to decode the persisted JSON object with the
relevant marshmallow schema, which could be implemented with a new
`MarshmallowCodec`. I can open a PR with the required changes. Alternatively,
feel free to take a stab at it if you want!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]