From c764aa6c2076466aad40f77cb8c034e1adb145f3 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Fri, 7 May 2021 05:18:06 +0530 Subject: [PATCH] fix: fixed the error in saving a new course --- community/lms/doctype/lms_course/lms_course.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/lms/doctype/lms_course/lms_course.py b/community/lms/doctype/lms_course/lms_course.py index 5d8c07e6..7dea7153 100644 --- a/community/lms/doctype/lms_course/lms_course.py +++ b/community/lms/doctype/lms_course/lms_course.py @@ -28,8 +28,8 @@ class LMSCourse(Document): def generate_slug(self, title): result = frappe.get_all( 'LMS Course', - fields=['slug']) - slugs = set([row['slug'] for row in result]) + fields=['name']) + slugs = set([row['name'] for row in result]) return slugify(title, used_slugs=slugs) def __repr__(self):