Merge pull request #22217 from sahil28297/fix_set_company_healthcare_patch_develop

fix(patch): escape special characters in company field
This commit is contained in:
Rucha Mahabal 2020-06-12 15:34:15 +05:30 committed by GitHub
commit 959efe88f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,4 +7,4 @@ def execute():
for entry in doctypes:
if frappe.db.exists('DocType', entry):
frappe.reload_doc('Healthcare', 'doctype', entry)
frappe.db.sql("update `tab{dt}` set company = '{company}' where ifnull(company, '') = ''".format(dt=entry, company=company))
frappe.db.sql("update `tab{dt}` set company = {company} where ifnull(company, '') = ''".format(dt=entry, company=frappe.db.escape(company)))