aminghadersohi commented on code in PR #37142:
URL: https://github.com/apache/superset/pull/37142#discussion_r2696191891


##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -161,6 +161,21 @@ async def get_chart_data(  # noqa: C901
                     or form_data.get("row_limit")
                     or current_app.config["ROW_LIMIT"]
                 )
+
+                # Handle different chart types that have different form_data 
structures
+                # big_number charts use "metric" (singular), not "metrics" 
(plural)
+                # and don't have groupby columns
+                viz_type = chart.viz_type or ""
+                if viz_type.startswith("big_number"):
+                    # big_number/big_number_total use "metric" (singular)

Review Comment:
   Good catch! Added `pop_kpi` (BigNumberPeriodOverPeriod) to the single-metric 
chart types. The migration file 
`2024-03-01_10-47_be1b217cd8cd_big_number_kpi_single_metric.py` confirms it 
also uses singular `metric` in form_data. Fixed in commit b95b9c89d3.



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