fix: fixed the error in saving a new course
This commit is contained in:
@@ -28,8 +28,8 @@ class LMSCourse(Document):
|
|||||||
def generate_slug(self, title):
|
def generate_slug(self, title):
|
||||||
result = frappe.get_all(
|
result = frappe.get_all(
|
||||||
'LMS Course',
|
'LMS Course',
|
||||||
fields=['slug'])
|
fields=['name'])
|
||||||
slugs = set([row['slug'] for row in result])
|
slugs = set([row['name'] for row in result])
|
||||||
return slugify(title, used_slugs=slugs)
|
return slugify(title, used_slugs=slugs)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user