From dbaa896fccab6f5206a02b156a074c4f98f550c7 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Fri, 7 May 2021 17:40:05 +0530 Subject: [PATCH] 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. --- community/lms/doctype/lms_sketch/lms_sketch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community/lms/doctype/lms_sketch/lms_sketch.py b/community/lms/doctype/lms_sketch/lms_sketch.py index 52275a6d..474ccf5d 100644 --- a/community/lms/doctype/lms_sketch/lms_sketch.py +++ b/community/lms/doctype/lms_sketch/lms_sketch.py @@ -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)