fix(mcp): fix crashes in list tools, dataset info, chart preview, and add owner/favorite filters (#38277)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Amin Ghadersohi
2026-03-13 12:46:52 +01:00
committed by GitHub
parent f458e2d484
commit d5cf77cd60
25 changed files with 297 additions and 72 deletions

View File

@@ -366,6 +366,6 @@ def test_chart_filter_existing_columns_still_work():
def test_dashboard_filter_existing_columns_still_work():
"""Test that pre-existing dashboard filter columns are not broken."""
for col in ("dashboard_title", "published", "favorite"):
for col in ("dashboard_title", "published", "created_by_fk"):
f = DashboardFilter(col=col, opr="eq", value="test")
assert f.col == col

View File

@@ -95,10 +95,11 @@ def test_model_list_tool_basic():
assert result.count == 2
assert result.total_count == 2
assert isinstance(result.items[0], DummyOutputSchema)
assert result.page == 1
# run_tool receives 0-based page; response reports 1-based (page+1)
assert result.page == 2
assert result.page_size == 2
assert result.total_pages == 1
# For page=1, ModelListCore sets has_previous=True
# For page=1 (0-based), ModelListCore sets has_previous=True
assert result.has_previous is True
assert result.has_next is False
assert result.columns_requested == ["id", "name"]