bito-code-review[bot] commented on PR #43504:
URL: https://github.com/apache/superset/pull/43504#issuecomment-5406743717
<!-- Bito Reply -->
The review suggestion is correct. The current implementation in
`superset/views/base.py` calls `.encode("utf-8")` on `spinner_svg` without
verifying that it is a string, which will raise an `AttributeError` if
`spinner_svg` is a non-string truthy value (e.g., a boolean or integer). To
resolve this, you should add a type check to ensure `spinner_svg` is a string
before attempting to encode it.
**superset/views/base.py**
```
if isinstance(spinner_svg, str):
spinner_svg_data_uri = "data:image/svg+xml;base64," +
base64.b64encode(
spinner_svg.encode("utf-8")
).decode("ascii")
```
--
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]