From 373e248e9fac5500462fb97d6c80c721f0e3ba6a Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Thu, 22 Apr 2021 22:47:39 +0530 Subject: [PATCH] fix(patch): lab module patch fix (#25447) (#25449) * fix(patch): lab module patch fix * fix: param Co-authored-by: Rucha Mahabal Co-authored-by: Anoop <3326959+akurungadam@users.noreply.github.com> --- .../v13_0/healthcare_lab_module_rename_doctypes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py b/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py index 028c61976c..9af0a8dbef 100644 --- a/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py +++ b/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py @@ -47,8 +47,8 @@ def execute(): for new, old in rename_fields.items(): if frappe.db.has_column('Normal Test Result', old): - frappe.db.sql("""UPDATE `tabNormal Test Result` SET %(new)s = %(old)s""", { - 'new': new, 'old': old}) + frappe.db.sql("""UPDATE `tabNormal Test Result` SET {} = {}""" + .format(new, old)) if frappe.db.has_column('Normal Test Template', 'test_event'): frappe.db.sql("""UPDATE `tabNormal Test Template` SET lab_test_event = test_event""") @@ -67,8 +67,8 @@ def execute(): for new, old in rename_fields.items(): if frappe.db.has_column('Lab Test Group Template', old): - frappe.db.sql("""UPDATE `tabLab Test Group Template` SET %(new)s = %(old)s""", { - 'new': new, 'old': old}) + frappe.db.sql("""UPDATE `tabLab Test Group Template` SET {} = {}""" + .format(new, old)) # rename field frappe.reload_doc('healthcare', 'doctype', 'lab_test')