From 4fe91422f4a7cb2e5cd7a1f1087835f6b699d2f1 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Wed, 10 Mar 2021 12:35:31 +0000 Subject: [PATCH] Fixed an error in finding if the sketch is editable --- community/www/sketches/sketch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/www/sketches/sketch.py b/community/www/sketches/sketch.py index 4991e185..e94f76e7 100644 --- a/community/www/sketches/sketch.py +++ b/community/www/sketches/sketch.py @@ -5,10 +5,10 @@ def get_context(context): course_name = get_queryparam("sketch", '/sketches') context.sketch = get_sketch(course_name) context.livecode_url = get_livecode_url() - context.editable = is_editable(context.sketch, frappe.sesson.user) + context.editable = is_editable(context.sketch, frappe.session.user) def is_editable(sketch, user): - if sketch.name == "new": + if sketch.is_new(): # new sketches can be editable by any logged in user return user != "Guest" else: