fix(API): allow creation from request data
Counteract f63ad574e5
Fix #8230
This commit is contained in:
parent
3d2e570553
commit
a71a92341e
1 changed files with 4 additions and 1 deletions
|
|
@ -113,7 +113,10 @@ def handle():
|
|||
doctype, **frappe.local.form_dict)})
|
||||
|
||||
if frappe.local.request.method=="POST":
|
||||
data = json.loads(frappe.local.form_dict.data)
|
||||
if frappe.local.form_dict.data is None:
|
||||
data = json.loads(request.get_data())
|
||||
else:
|
||||
data = json.loads(frappe.local.form_dict.data)
|
||||
data.update({
|
||||
"doctype": doctype
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue