You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/19 16:13:26 UTC

[GitHub] [superset] dpgaspar commented on a change in pull request #12586: fix: error while parsing invalid json form_data

dpgaspar commented on a change in pull request #12586:
URL: https://github.com/apache/superset/pull/12586#discussion_r560297934



##########
File path: superset/charts/api.py
##########
@@ -549,13 +549,18 @@ def data(self) -> Response:
             500:
               $ref: '#/components/responses/500'
         """
+        json_body = None
         if request.is_json:
             json_body = request.json
         elif request.form.get("form_data"):
             # CSV export submits regular form data
-            json_body = json.loads(request.form["form_data"])
-        else:
-            return self.response_400(message="Request is not JSON")
+            try:

Review comment:
       note: we should eventually refactor the frontend CSV export to use the expected payload




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org