fix(BOM): Sever Error due in bom query to new behaviour of db.escape in v12 (#18401)
fixes bug introduced by commit 6a7969117f1ec438f25ec5f8bfbbec10a04ef01d
This commit is contained in:
parent
0a8816e053
commit
747c2624cd
@ -207,10 +207,10 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
idx desc, name
|
idx desc, name
|
||||||
limit %(start)s, %(page_len)s """.format(
|
limit %(start)s, %(page_len)s """.format(
|
||||||
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
|
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
|
||||||
mcond=get_match_cond(doctype),
|
mcond=get_match_cond(doctype).replace('%', '%%'),
|
||||||
key=frappe.db.escape(searchfield)),
|
key=searchfield),
|
||||||
{
|
{
|
||||||
'txt': "%"+frappe.db.escape(txt)+"%",
|
'txt': '%' + txt + '%',
|
||||||
'_txt': txt.replace("%", ""),
|
'_txt': txt.replace("%", ""),
|
||||||
'start': start or 0,
|
'start': start or 0,
|
||||||
'page_len': page_len or 20
|
'page_len': page_len or 20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user