feat: paid courses
This commit is contained in:
20
lms/patches/v1_0/paid_certificate_to_paid_course.py
Normal file
20
lms/patches/v1_0/paid_certificate_to_paid_course.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
courses = frappe.get_all(
|
||||
"LMS Course",
|
||||
{"paid_certificate": ["is", "set"]},
|
||||
["name", "price_certificate", "currency"],
|
||||
)
|
||||
|
||||
for course in courses:
|
||||
frappe.db.set_value(
|
||||
"LMS Course",
|
||||
course.name,
|
||||
{
|
||||
"paid_course": 1,
|
||||
"course_price": course.price_certificate,
|
||||
"currency": course.currency,
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user