From 79bc819f929bf428cb073b353ec0b223da30ab2f Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 13 Apr 2020 18:51:04 +0530 Subject: [PATCH] fix: Healthcare Patch --- erpnext/patches/v12_0/update_healthcare_refactored_changes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v12_0/update_healthcare_refactored_changes.py b/erpnext/patches/v12_0/update_healthcare_refactored_changes.py index 5f249e4d17..02378e0922 100644 --- a/erpnext/patches/v12_0/update_healthcare_refactored_changes.py +++ b/erpnext/patches/v12_0/update_healthcare_refactored_changes.py @@ -67,7 +67,8 @@ def execute(): practitioners = frappe.db.sql("select name from `tabHealthcare Practitioner` where 'active'= 0", as_dict=1) practitioners_lst = [p.name for p in practitioners] frappe.reload_doc('healthcare', 'doctype', 'healthcare_practitioner') - frappe.db.sql("update `tabHealthcare Practitioner` set status = 'Disabled' where name IN %(practitioners)s""", {"practitioners": practitioners_lst}) + if practitioners_lst: + frappe.db.sql("update `tabHealthcare Practitioner` set status = 'Disabled' where name IN %(practitioners)s""", {"practitioners": practitioners_lst}) # set Clinical Procedure status if frappe.db.exists('DocType', 'Clinical Procedure'):