Skip to content

Commit 82389c6

Browse files
aminghadersohiclaude
authored andcommitted
refactor(mcp): simplify single metric chart type check (#37215)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e4a6154 commit 82389c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

superset/mcp_service/chart/tool/get_chart_data.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ async def get_chart_data( # noqa: C901
168168
# - pop_kpi (BigNumberPeriodOverPeriod)
169169
# These charts also don't have groupby columns
170170
viz_type = chart.viz_type or ""
171-
single_metric_types = ("big_number", "pop_kpi")
172-
if viz_type.startswith("big_number") or viz_type in single_metric_types:
171+
if viz_type in ("big_number", "big_number_total", "pop_kpi"):
173172
# These chart types use "metric" (singular)
174173
metric = form_data.get("metric")
175174
metrics = [metric] if metric else []

0 commit comments

Comments
 (0)