chore: renamed lms certification to lms certificate
This commit is contained in:
7
lms/patches/v0_0/certification_member_field_data.py
Normal file
7
lms/patches/v0_0/certification_member_field_data.py
Normal file
@@ -0,0 +1,7 @@
|
||||
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)
|
||||
12
lms/patches/v0_0/move_certification_to_certificate.py
Normal file
12
lms/patches/v0_0/move_certification_to_certificate.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
old = frappe.get_all("LMS Certification", fields=["name", "course", "member", "student", "issue_date", "expiry_date"])
|
||||
for data in old:
|
||||
frappe.get_doc({
|
||||
"doctype": "LMS Certificate",
|
||||
"course": data.course,
|
||||
"member": data.member or data.student,
|
||||
"issue_date": data.issue_date,
|
||||
"expiry_date": data.expiry_date
|
||||
}).save(ignore_permissions=True)
|
||||
Reference in New Issue
Block a user