fix: field cleanup
This commit is contained in:
@@ -2,7 +2,7 @@ import frappe
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("lms", "doctype", "lms_course")
|
||||
courses = frappe.get_all("LMS Course", {"status": ("is", "not set")}, ["name", "is_published"])
|
||||
courses = frappe.get_all("LMS Course", {"status": ("is", "not set")}, ["name", "published"])
|
||||
for course in courses:
|
||||
status = "Approved" if course.is_published else "In Progress"
|
||||
status = "Approved" if course.published else "In Progress"
|
||||
frappe.db.set_value("LMS Course", course.name, "status", status)
|
||||
|
||||
Reference in New Issue
Block a user