Commit 0bf69c9e authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_hal_json_style: exclude blobs when rendering fields

As blobs aren't serializable
parent 831b9c4b
......@@ -551,7 +551,11 @@ def renderField(traversed_document, field, form, value=None, meta_type=None, key
if v))
if parameters:
result["default"] = '%s?%s' % (result["default"], parameters)
if meta_type == "FileField":
# FileField contain blobs (FileUpload instances), which aren't seriazable,
# thus trying to return it to the client, besides being useless, breaks
# the hal API
del result["default"]
return result
if meta_type == "DateTimeField":
......
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