Commit 07ec5019 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_web: force object.data conversion to str during mhtml build

parent b06fbc61
......@@ -184,7 +184,7 @@ def handleHrefObject(obj, src, default_mimetype="text/html", default_data="<p>Li
mime = obj.getContentType()
if mime:
if hasattr(obj, "data"):
data = obj.data or ""
data = str(obj.data or "")
else:
data = getattr(obj, "getData", lambda: str(obj))() or ""
if isinstance(data, unicode):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment