This is an automated email from the ASF dual-hosted git repository.
arivero pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 2bcb66c2fc0 refactor(mcp): simplify single metric chart type check
(#37215)
2bcb66c2fc0 is described below
commit 2bcb66c2fc0217e45b706835f4444eaf61484a2b
Author: Amin Ghadersohi <[email protected]>
AuthorDate: Fri Jan 16 13:35:26 2026 -0500
refactor(mcp): simplify single metric chart type check (#37215)
Co-authored-by: Claude Opus 4.5 <[email protected]>
---
superset/mcp_service/chart/tool/get_chart_data.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/superset/mcp_service/chart/tool/get_chart_data.py
b/superset/mcp_service/chart/tool/get_chart_data.py
index f72da49660f..9984aa1d9bb 100644
--- a/superset/mcp_service/chart/tool/get_chart_data.py
+++ b/superset/mcp_service/chart/tool/get_chart_data.py
@@ -168,8 +168,7 @@ async def get_chart_data( # noqa: C901
# - pop_kpi (BigNumberPeriodOverPeriod)
# These charts also don't have groupby columns
viz_type = chart.viz_type or ""
- single_metric_types = ("big_number", "pop_kpi")
- if viz_type.startswith("big_number") or viz_type in
single_metric_types:
+ if viz_type in ("big_number", "big_number_total", "pop_kpi"):
# These chart types use "metric" (singular)
metric = form_data.get("metric")
metrics = [metric] if metric else []