fix: field cleanup

This commit is contained in:
Jannat Patel
2022-03-24 18:59:58 +05:30
parent 2b348916f4
commit 77df068fea
14 changed files with 21 additions and 67 deletions

View File

@@ -155,7 +155,7 @@
<img class="ml-2" src="/assets/lms/icons/white-arrow.svg" />
</div>
{% elif is_instructor(course.name) and not course.is_published and course.status != "Under Review" %}
{% elif is_instructor(course.name) and not course.published and course.status != "Under Review" %}
<div class="button wide-button is-primary" id="submit-for-review" data-course="{{ course.name | urlencode }}">
{{ _("Submit for Review") }}
<img class="ml-2" src="/assets/lms/icons/white-arrow.svg" />

View File

@@ -12,7 +12,7 @@ def get_context(context):
raise frappe.Redirect
course = frappe.db.get_value("LMS Course", course_name,
["name", "title", "image", "short_introduction", "description", "is_published", "upcoming",
["name", "title", "image", "short_introduction", "description", "published", "upcoming",
"disable_self_learning", "video_link", "enable_certification", "status"],
as_dict=True)

View File

@@ -14,7 +14,7 @@ def get_context(context):
def get_courses():
courses = frappe.get_all("LMS Course",
filters={"is_published": True},
filters={"published": True},
fields=["name", "upcoming", "title", "image", "enable_certification"])
live_courses, upcoming_courses = [], []