fix: accept only embed id for preview video

This commit is contained in:
Jannat Patel
2023-02-21 09:52:20 +05:30
parent d1e7549da9
commit 080a02589c
4 changed files with 18 additions and 1 deletions

View 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)