fix: Migrate translation patch

This commit is contained in:
Suraj Shetty 2020-05-05 10:46:14 +05:30
parent d89bbba0cb
commit abc3528062

View file

@ -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")