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 139751a684d..f632c94239f 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()