Files
enlight-lms/lms/patches/v0_0/certification_member_field_data.py
2025-08-11 17:48:37 +05:30

9 lines
295 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)