Skip to content

Commit

Permalink
fix(patch): lab module patch fix (#25447)
Browse files Browse the repository at this point in the history
* fix(patch): lab module patch fix

* fix: param

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
  • Loading branch information
akurungadam and ruchamahabal committed Apr 22, 2021
1 parent 3d4acf9 commit c21ce42
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -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""")
Expand All @@ -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')
Expand Down

0 comments on commit c21ce42

Please sign in to comment.