Always-prog commented on code in PR #24160:
URL: https://github.com/apache/superset/pull/24160#discussion_r1199731104


##########
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 Yes, but at the superset/views/core.py:836 you're parsing 
url_params the same way using `dict`
   ```python
           if key is not None:
               command = GetExplorePermalinkCommand(key)
               try:
                   permalink_value = command.run()
                   if permalink_value:
                       state = permalink_value["state"]
                       initial_form_data = state["formData"]
                       url_params = state.get("urlParams")
                       if url_params:
                           initial_form_data["url_params"] = dict(url_params)
                   else:
                       return json_error_response(
                           _("Error: permalink state not found"), status=404
                       )
               except (ChartNotFoundError, ExplorePermalinkGetFailedError) as 
ex:
                   flash(__("Error: %(msg)s", msg=ex.message), "danger")
                   return redirect("/chart/list/")
   ```



-- 
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]

Reply via email to