Commit ce9edca7 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_web: fix data is not string or buffer on WebPage_exportAsSingleFile

when converting an image, the returned value of img.convert
is not everytime a string. It might be a kind of acquisition
value
parent a2107402
...@@ -172,7 +172,7 @@ def handleImageSourceObject(obj, src): ...@@ -172,7 +172,7 @@ def handleImageSourceObject(obj, src):
format_kw["display"] = value format_kw["display"] = value
if format_kw: if format_kw:
mime, data = obj.convert(**format_kw) mime, data = obj.convert(**format_kw)
return handleLinkedData(mime, data, src) return handleLinkedData(mime, str(data), src)
return handleHrefObject(obj, src, default_mimetype=bad_image_mime_type, default_data=bad_image_data) return handleHrefObject(obj, src, default_mimetype=bad_image_mime_type, default_data=bad_image_data)
......
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