fix(BOM): Sever Error due in bom query to new behaviour of db.escape in v12 (#18401)

fixes bug introduced by commit 6a7969117f
This commit is contained in:
Karthikeyan S
2019-07-19 22:49:21 +05:30
committed by GitHub
parent 0a8816e053
commit 747c2624cd

View File

@@ -207,10 +207,10 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
idx desc, name
limit %(start)s, %(page_len)s """.format(
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
mcond=get_match_cond(doctype),
key=frappe.db.escape(searchfield)),
mcond=get_match_cond(doctype).replace('%', '%%'),
key=searchfield),
{
'txt': "%"+frappe.db.escape(txt)+"%",
'txt': '%' + txt + '%',
'_txt': txt.replace("%", ""),
'start': start or 0,
'page_len': page_len or 20