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:
@@ -77,7 +77,7 @@ def save_sketch(name, title, code):
|
|||||||
doc.title = title
|
doc.title = title
|
||||||
doc.code = code
|
doc.code = code
|
||||||
doc.runtime = 'python-canvas'
|
doc.runtime = 'python-canvas'
|
||||||
doc.insert()
|
doc.insert(ignore_permissions=True)
|
||||||
status = "created"
|
status = "created"
|
||||||
else:
|
else:
|
||||||
doc = frappe.get_doc("LMS Sketch", name)
|
doc = frappe.get_doc("LMS Sketch", name)
|
||||||
|
|||||||
Reference in New Issue
Block a user