Merge pull request #21255 from ruchamahabal/fix-patch

fix: Healthcare Patch
This commit is contained in:
sahil28297 2020-04-13 18:56:51 +05:30 committed by GitHub
commit c11ac6a73f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'):