mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: safe check when computing chart thumbnail (#23432)
This commit is contained in:
@@ -48,6 +48,9 @@ def cache_chart_thumbnail(
|
||||
logger.warning("No cache set, refusing to compute")
|
||||
return None
|
||||
chart = cast(Slice, Slice.get(chart_id))
|
||||
if not chart:
|
||||
logger.warning("No chart found, skip computing chart thumbnail")
|
||||
return None
|
||||
url = get_url_path("Superset.slice", slice_id=chart.id)
|
||||
logger.info("Caching chart: %s", url)
|
||||
_, username = get_executor(
|
||||
|
||||
Reference in New Issue
Block a user