Commit 94d4b0b4 authored by Romain Courteaud's avatar Romain Courteaud

erp5_json_rpc_api: bypass strange jsonform behaviour

parent c2b3b1de
......@@ -352,7 +352,8 @@ class JsonRpcAPIService(OpenAPIService):
except jsonschema.exceptions.ValidationError as e:
raise JsonRpcAPIInvalidJsonDictContent(str(e))
response = request.RESPONSE
if response.getHeader('Content-Type'):
return result
# XXX Hardcoded JSONForm behaviour
if result == "Nothing to do":
result = {}
response.setHeader("Content-Type", "application/json")
return json.dumps(result).encode()
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