From 8a3e31f021acad5928a05b58749627149c62d03a Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Mon, 19 Jul 2021 17:03:38 +0530 Subject: [PATCH] fix: only show the published courses on All Courses page Closes #155 --- community/www/courses/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community/www/courses/index.py b/community/www/courses/index.py index 86d6acf2..f1027177 100644 --- a/community/www/courses/index.py +++ b/community/www/courses/index.py @@ -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))