williaster commented on a change in pull request #4607: [slice_json] pass slice id to get_form_data() URL: https://github.com/apache/incubator-superset/pull/4607#discussion_r174253852
########## File path: superset/views/core.py ########## @@ -1122,10 +1123,10 @@ def generate_json(self, datasource_type, datasource_id, form_data, @expose('/slice_json/<slice_id>') def slice_json(self, slice_id): try: - viz_obj = self.get_viz(slice_id) - datasource_type = viz_obj.datasource.type - datasource_id = viz_obj.datasource.id - form_data, slc = self.get_form_data() + form_data, slc = self.get_form_data(slice_id) Review comment: yeah I talked to @graceguo-supercat about `get_form_data` and it's supposed to encapsulate all of the logic for form data + overrides. you can see [on this line](https://github.com/apache/incubator-superset/blob/2bc089ef8dcec5d98a43cb2ec80aacf1cdc706cf/superset/views/core.py#L1004) that it will override the saved slice params with any in the request ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services