Merge pull request #10228 from surajshetty3416/run-patch
This commit is contained in:
commit
89a5503447
3 changed files with 3 additions and 12 deletions
|
|
@ -277,3 +277,4 @@ frappe.patches.v13_0.set_existing_dashboard_charts_as_public
|
|||
frappe.patches.v13_0.set_path_for_homepage_in_web_page_view
|
||||
frappe.patches.v13_0.migrate_translation_column_data
|
||||
frappe.patches.v13_0.set_read_times
|
||||
frappe.patches.v13_0.remove_web_view
|
||||
|
|
|
|||
|
|
@ -2,14 +2,4 @@ import frappe
|
|||
|
||||
def execute():
|
||||
frappe.reload_doctype('Translation')
|
||||
frappe.db.sql("""
|
||||
UPDATE `tabTranslation`
|
||||
SET
|
||||
translated_text=target_name,
|
||||
source_text=source_name,
|
||||
contribution_status=(CASE status
|
||||
WHEN 'Deleted' THEN 'Rejected'
|
||||
ELSE ''
|
||||
END),
|
||||
contributed=0
|
||||
""")
|
||||
frappe.db.sql("UPDATE `tabTranslation` SET `translated_text`=`target_name`, `source_text`=`source_name`, `contributed`=0")
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ def get_read_time(blog):
|
|||
if blog.content_type == "Markdown":
|
||||
content = markdown(blog.content_md)
|
||||
|
||||
total_words = len(strip_html_tags(content).split())
|
||||
total_words = len(strip_html_tags(content or "").split())
|
||||
return ceil(total_words/250)
|
||||
Loading…
Add table
Reference in a new issue