Commit 226cedcb authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_web: fix use wrong convert cache key (force str format_kw values)

obj.convert(format="png") != obj.convert(format=u"png")
parent b54b55dd
...@@ -167,10 +167,10 @@ def handleImageSourceObject(obj, src): ...@@ -167,10 +167,10 @@ def handleImageSourceObject(obj, src):
format_kw = {} format_kw = {}
for key, value in search: for key, value in search:
if key == "format" and value is not None: if key == "format" and value is not None:
format_kw["format"] = value format_kw["format"] = str(value)
elif key == "display" and value is not None: elif key == "display" and value is not None:
format_kw.setdefault("format", "") format_kw.setdefault("format", "")
format_kw["display"] = value format_kw["display"] = str(value)
if format_kw: if format_kw:
mime, data = obj.convert(**format_kw) mime, data = obj.convert(**format_kw)
return handleLinkedData(mime, str(data), src) return handleLinkedData(mime, str(data), src)
......
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