fix: profile, dashboard and tests

This commit is contained in:
Jannat Patel
2022-09-05 13:32:51 +05:30
parent 7ef625c598
commit e84e02ff07
8 changed files with 68 additions and 46 deletions

View File

@@ -167,7 +167,8 @@ def get_authored_courses(member=None, only_published=True):
for course in courses:
detail = frappe.db.get_value("LMS Course", course.parent,
["name", "upcoming", "title", "image", "enable_certification", "status", "published"], as_dict=True)
if only_published and not detail.published:
if only_published and detail and not detail.published:
continue
course_details.append(detail)