fix: fixed the issue of users unable to save sketches

Inserting new sketches is failing because the web user role doesn't have
permission to create sketches. Fixed it by adding
ignore_permission=True.
This commit is contained in:
Anand Chitipothu
2021-05-07 17:40:05 +05:30
parent 5d14dce320
commit dbaa896fcc

View File

@@ -77,7 +77,7 @@ def save_sketch(name, title, code):
doc.title = title
doc.code = code
doc.runtime = 'python-canvas'
doc.insert()
doc.insert(ignore_permissions=True)
status = "created"
else:
doc = frappe.get_doc("LMS Sketch", name)