From c35665fa602c0db2578d646cd878e05d0ca21935 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Mon, 12 Mar 2018 15:21:53 +0530 Subject: [PATCH] update physician patch fail (#13277) --- .../v10_0/remove_and_copy_fields_in_physician.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/patches/v10_0/remove_and_copy_fields_in_physician.py b/erpnext/patches/v10_0/remove_and_copy_fields_in_physician.py index 139751a684..f632c94239 100644 --- a/erpnext/patches/v10_0/remove_and_copy_fields_in_physician.py +++ b/erpnext/patches/v10_0/remove_and_copy_fields_in_physician.py @@ -5,9 +5,9 @@ def execute(): frappe.reload_doc("healthcare", "doctype", "physician") frappe.reload_doc("healthcare", "doctype", "physician_service_unit_schedule") - if frappe.db.has_column('Physician', 'physician_schedule'): - for doc in frappe.get_all('Physician'): - _doc = frappe.get_doc('Physician', doc.name) - if _doc.physician_schedule: - _doc.append('physician_schedules', {'schedule': _doc.physician_schedule}) - _doc.save() + if frappe.db.has_column('Physician', 'physician_schedule'): + for doc in frappe.get_all('Physician'): + _doc = frappe.get_doc('Physician', doc.name) + if _doc.physician_schedule: + _doc.append('physician_schedules', {'schedule': _doc.physician_schedule}) + _doc.save()