From 7f571798d99da34525c8d4e0f665ec6410ebbf48 Mon Sep 17 00:00:00 2001 From: Yaroslav Hreshko Date: Tue, 9 Aug 2016 13:38:11 +0300 Subject: [PATCH] Fix issue: There is an error appear "ValueError: No JSON object could be decoded" when data is sent from SAP to ERPNext in http request body. Signed-off-by: Yaroslav --- frappe/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frappe/app.py b/frappe/app.py index 3218906938..ffc52bd0e7 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -55,6 +55,8 @@ def application(request): response = frappe.handler.handle() elif frappe.request.path.startswith("/api/"): + if frappe.local.form_dict.data is None: + frappe.local.form_dict.data = request.get_data() response = frappe.api.handle() elif frappe.request.path.startswith('/backups'):