diff --git a/frappe/patches.txt b/frappe/patches.txt index e492a547a4..a086fa6f4a 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -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 diff --git a/frappe/patches/v13_0/migrate_translation_column_data.py b/frappe/patches/v13_0/migrate_translation_column_data.py index b43333cce7..7c83f93081 100644 --- a/frappe/patches/v13_0/migrate_translation_column_data.py +++ b/frappe/patches/v13_0/migrate_translation_column_data.py @@ -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") diff --git a/frappe/patches/v13_0/set_read_times.py b/frappe/patches/v13_0/set_read_times.py index ce16acc602..6957139372 100644 --- a/frappe/patches/v13_0/set_read_times.py +++ b/frappe/patches/v13_0/set_read_times.py @@ -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) \ No newline at end of file