feat(bug): defensive code to avoid accesing attribute of a NoneType object (#35219)

This commit is contained in:
Gabriel Torres Ruiz
2025-09-22 13:38:08 -04:00
committed by GitHub
parent 5ec8f9d886
commit 48e1b1ff2c

View File

@@ -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(