mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat(bug): defensive code to avoid accesing attribute of a NoneType object (#35219)
This commit is contained in:
committed by
GitHub
parent
5ec8f9d886
commit
48e1b1ff2c
@@ -1342,6 +1342,8 @@ class DashboardRestApi(BaseSupersetModelRestApi):
|
||||
self.incr_stats("from_cache", self.thumbnail.__name__)
|
||||
try:
|
||||
image = cache_payload.get_image()
|
||||
if not image or not hasattr(image, "read"):
|
||||
return self.response_404()
|
||||
except ScreenshotImageNotAvailableException:
|
||||
return self.response_404()
|
||||
return Response(
|
||||
|
||||
Reference in New Issue
Block a user