fix: Patch reload doctype
This commit is contained in:
parent
f18dd05c00
commit
53cd60c217
@ -3,6 +3,8 @@ import frappe
|
||||
from erpnext.utilities.doctype.video.video import get_id_from_url
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("utilities", "doctype","video")
|
||||
|
||||
for video in frappe.get_all("Video", fields=["name", "url", "youtube_video_id"]):
|
||||
if video.url and not video.youtube_video_id:
|
||||
frappe.db.set_value("Video", video.name, "youtube_video_id", get_id_from_url(video.url))
|
@ -140,8 +140,6 @@ def batch_update_youtube_data():
|
||||
comment_count = %(comment_count)s
|
||||
WHERE youtube_video_id = '{0}'""".format(video_id), stats)
|
||||
|
||||
frappe.log_error("yooooooooo")
|
||||
|
||||
video_list = frappe.get_all("Video", fields=["youtube_video_id"])
|
||||
if len(video_list) > 50:
|
||||
# Update in batches of 50
|
||||
|
Loading…
x
Reference in New Issue
Block a user