update physician patch fail (#13277)

This commit is contained in:
Zarrar 2018-03-12 15:21:53 +05:30 committed by Nabin Hait
parent b48557fdc6
commit c35665fa60

View File

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