villebro commented on code in PR #22328:
URL: https://github.com/apache/superset/pull/22328#discussion_r1042055267


##########
superset/dashboards/api.py:
##########
@@ -879,16 +880,21 @@ def thumbnail(self, pk: int, digest: str, **kwargs: Any) 
-> WerkzeugResponse:
             500:
               $ref: '#/components/responses/500'
         """
-        dashboard = self.datamodel.get(pk, self._base_filters)
+        dashboard = cast(Dashboard, self.datamodel.get(pk, self._base_filters))

Review Comment:
   This is a VERY good point that I hadn't thought of! Thanks for catching this!



##########
superset/models/slice.py:
##########
@@ -234,10 +234,7 @@ def data(self) -> Dict[str, Any]:
 
     @property
     def digest(self) -> str:
-        """
-        Returns a MD5 HEX digest that makes this dashboard unique
-        """
-        return md5_sha_from_str(self.params or "")
+        return get_chart_digest(self)

Review Comment:
   Good idea 👍 



-- 
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]

Reply via email to