nandwalritik commented on code in PR #27409:
URL: https://github.com/apache/superset/pull/27409#discussion_r1680723593


##########
superset/charts/data/api.py:
##########
@@ -359,6 +360,14 @@ def _send_chart_response(
             result = apply_post_process(result, form_data, datasource)
 
         if result_format in ChartDataResultFormat.table_like():
+            # Get chart name from slice_id
+            if form_data is not None and "slice_id" in form_data:
+                slice_obj = (
+                    
db.session.query(Slice).filter_by(id=form_data["slice_id"]).first()
+                )
+                chart_name = slice_obj.chart
+            else:
+                chart_name = "query"

Review Comment:
   @sfirke I just added the checks in if condition so the test cases can pass.



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