mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix: safe check when computing chart thumbnail (#23432)
This commit is contained in:
parent
7ef06b0a60
commit
226b60bc4f
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user