fix: Reload doc in Healthcare company patch (#21808)

This commit is contained in:
Marica 2020-05-20 16:12:46 +05:30 committed by GitHub
parent e9864aa578
commit 91a9d3fbe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,4 +6,5 @@ def execute():
doctypes = ['Clinical Procedure', 'Inpatient Record', 'Lab Test', 'Patient Appointment', 'Patient Encounter', 'Vital Signs']
for entry in doctypes:
if frappe.db.exists('DocType', entry):
frappe.reload_doc("Healthcare", "doctype", entry)
frappe.db.sql("update `tab{dt}` set company = '{company}' where ifnull(company, '') = ''".format(dt=entry, company=company))