hxtmdev commented on code in PR #33108:
URL: https://github.com/apache/superset/pull/33108#discussion_r2051815727
##########
superset/dashboards/api.py:
##########
@@ -1307,6 +1308,11 @@ def thumbnail(self, pk: int, digest: str, **kwargs: Any)
-> WerkzeugResponse:
dashboard_id=dashboard.id,
force=False,
)
+
+ if (
+ cache_payload.should_trigger_task()
Review Comment:
Hmm, tbh I wasn't looking to kick off a bigger refactoring here. I was
mainly just fixing the 500 that currently occurs when the screenshot is in the
ERROR or COMPUTING state.
I only touched the COMPUTING part because the lines are adjacent and it's
arguably part of the logic I was modifying anyway. Without changing that it
will return 404 too, still better than the 500 it returns right now, but maybe
not as correct.
If I reduce this PR to returning a clean 404 when the cache payload contains
no image, would you be willing to merge that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]