Files
lms/lms/patches/v1_0/publish_certificates.py
Jannat Patel 82b8853f39 fix: patches
2023-09-13 15:10:52 +05:30

10 lines
256 B
Python

import frappe
def execute():
frappe.reload_doc("lms", "doctype", "lms_certificate")
certificates = frappe.get_all("LMS Certificate", pluck="name")
for certificate in certificates:
frappe.db.set_value("LMS Certificate", certificate, "published", 1)