Fix for api.py
Now understands doc name with '/' in it. Also stop updating docs to be deleted.
This commit is contained in:
parent
3a2b4ee2df
commit
ce6b83a215
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ def handle():
|
|||
DELETE will delete
|
||||
/api/resource/{doctype}/{name}?run_method={method} will run a whitelisted controller method
|
||||
"""
|
||||
parts = frappe.request.path[1:].split("/")
|
||||
parts = frappe.request.path[1:].split("/",3)
|
||||
call = doctype = name = None
|
||||
|
||||
if len(parts) > 1:
|
||||
|
|
@ -76,7 +76,7 @@ def handle():
|
|||
frappe.db.commit()
|
||||
|
||||
if frappe.local.request.method=="DELETE":
|
||||
doc.update(data)
|
||||
# doc.update(data)
|
||||
# Not checking permissions here because it's checked in delete_doc
|
||||
frappe.delete_doc(doctype, name)
|
||||
frappe.local.response.http_status_code = 202
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue