Files
enlight-lms/lms/patches/v0_0/certification_member_field_data.py
2022-04-01 18:56:57 +05:30

8 lines
309 B
Python

import frappe
def execute():
frappe.reload_doc("lms", "doctype", "lms_certification")
certificates = frappe.get_all("LMS Certification", fields=["name", "student"])
for certificate in certificates:
frappe.db.set_value("LMS Certification", certificate.name, "member", certificate.student)