From fba15b3874f48e3863de1a3ecf06edd9ef9bfa67 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Tue, 14 Dec 2021 13:55:24 +0530 Subject: [PATCH] fix: Combine request args and form data - To accept argument via both way in a single request --- frappe/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/app.py b/frappe/app.py index 70575fe2f1..d73dd67983 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -185,7 +185,9 @@ def make_form_dict(request): if 'application/json' in (request.content_type or '') and request_data: args = json.loads(request_data) else: - args = request.form or request.args + args = {} + args.update(request.args or {}) + args.update(request.form or {}) if not isinstance(args, dict): frappe.throw(_("Invalid request arguments"))