Always-prog commented on code in PR #24160:
URL: https://github.com/apache/superset/pull/24160#discussion_r1199736278
##########
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:
@villebro So the `urlencode` function taking dictionary, it means that we
need to make dictionary from urlParams that have type List[Tuple[str, str]] (as
you doing it in superset/views/core.py:836)
##########
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:
@villebro So the `urlencode` function taking dictionary, it means that we
need to make dictionary from urlParams that have type `List[Tuple[str, str]]`
(as you doing it in superset/views/core.py:836)
--
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]