fix: accept only embed id for preview video
This commit is contained in:
11
lms/patches/v0_0/video_embed_link.py
Normal file
11
lms/patches/v0_0/video_embed_link.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
courses = frappe.get_all(
|
||||
"LMS Course", {"video_link": ["is", "set"]}, ["name", "video_link"]
|
||||
)
|
||||
for course in courses:
|
||||
if course.video_link:
|
||||
link = course.video_link.split("/")[-1]
|
||||
frappe.db.set_value("LMS Course", course.name, "video_link", link)
|
||||
Reference in New Issue
Block a user