Merge pull request #156 from fossunited/fix-only-show-published-courses

fix: only show the published courses on All Courses page
This commit is contained in:
Jannat Patel
2021-07-19 17:11:03 +05:30
committed by GitHub

View File

@@ -5,7 +5,7 @@ def get_context(context):
context.courses = get_courses()
def get_courses():
course_names = frappe.get_all("LMS Course", pluck="name")
course_names = frappe.get_all("LMS Course", filters={"is_published": True}, pluck="name")
courses = []
for course in course_names:
courses.append(frappe.get_doc("LMS Course", course))