mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
perf: fix N+1 query in chart list API when thumbnail_url is requested (#37895)
This commit is contained in:
committed by
GitHub
parent
d640fe42c9
commit
98ca599eef
@@ -407,6 +407,7 @@ def test_chart_digest(
|
||||
**(chart_overrides or {}),
|
||||
}
|
||||
chart = Slice(**kwargs)
|
||||
chart.table = datasource
|
||||
|
||||
user: User | None = None
|
||||
if has_current_user:
|
||||
@@ -422,12 +423,6 @@ def test_chart_digest(
|
||||
"THUMBNAIL_CHART_DIGEST_FUNC": func,
|
||||
},
|
||||
),
|
||||
patch.object(
|
||||
type(chart),
|
||||
"datasource",
|
||||
new_callable=PropertyMock,
|
||||
return_value=datasource,
|
||||
),
|
||||
patch.object(security_manager, "find_user", return_value=user),
|
||||
override_user(user),
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user