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 2018/12/13 08:04:08 UTC

[GitHub] hughhhh commented on a change in pull request #6380: [SIP5]Implemented get_payload for query_context.

hughhhh commented on a change in pull request #6380: [SIP5]Implemented get_payload for query_context.
URL: https://github.com/apache/incubator-superset/pull/6380#discussion_r241301882
 
 

 ##########
 File path: superset/views/api.py
 ##########
 @@ -23,9 +25,31 @@ def query(self):
         for the given query_obj.
         """
         query_context = QueryContext(**json.loads(request.form.get('query_context')))
-        security_manager.assert_datasource_permission(query_context.datasource, g.user)
-        payload_json = query_context.get_data()
-        return data_payload_response(payload_json)
+        security_manager.assert_datasource_permission(query_context.datasource)
+        payload_json = query_context.get_payload()
+        return json.dumps(payload_json)
+
+    @Log.log_this
+    @api
+    @handle_api_exception
+    @has_access_api
+    @expose('/v1/form_data/', methods=['GET'])
+    def query_form_data(self):
+        """
+        Takes a query_obj constructed in the client and returns payload data response
+        for the given query_obj.
+        """
+        form_data = {}
+        slice_id = request.args.get('slice_id')
+        print(slice_id)
 
 Review comment:
   remove print

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

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