From 8d8358644cdcbd1156f4ce79d7654c693df83265 Mon Sep 17 00:00:00 2001 From: Sachin Mane Date: Wed, 3 Jan 2018 17:48:10 +0530 Subject: [PATCH] Fix JSON parse failure incase POST with no content is called. (#4743) --- frappe/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/app.py b/frappe/app.py index 4c6acc3538..0f716ac9e6 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -123,7 +123,7 @@ def init_request(request): def make_form_dict(request): import json - if request.content_type == 'application/json': + if request.content_type == 'application/json' and request.data: args = json.loads(request.data) else: args = request.form or request.args