fix: formatting
This commit is contained in:
@@ -624,14 +624,14 @@ def show_start_learing_cta(course, membership):
|
|||||||
|
|
||||||
def has_lessons(course):
|
def has_lessons(course):
|
||||||
lesson_exists = False
|
lesson_exists = False
|
||||||
chapter_exists = frappe.db.get_value("Chapter Reference", {
|
chapter_exists = frappe.db.get_value(
|
||||||
"parent": course.name
|
"Chapter Reference", {"parent": course.name}, ["name", "chapter"], as_dict=True
|
||||||
}, ["name", "chapter"], as_dict=True)
|
)
|
||||||
|
|
||||||
if chapter_exists:
|
if chapter_exists:
|
||||||
lesson_exists = frappe.db.exists("Lesson Reference", {
|
lesson_exists = frappe.db.exists(
|
||||||
"parent": chapter_exists.chapter
|
"Lesson Reference", {"parent": chapter_exists.chapter}
|
||||||
})
|
)
|
||||||
|
|
||||||
return lesson_exists
|
return lesson_exists
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user