fix(contact): ensure query is compatible with postgres

This commit is contained in:
AarDG10 2026-01-20 11:48:09 +05:30
parent 8e3fcc4f47
commit 72ce53bb6a

View file

@ -366,7 +366,7 @@ def contact_query(doctype, txt, searchfield, start, page_len, filters):
order by
if(locate(%(_txt)s, `tabContact`.full_name), locate(%(_txt)s, `tabContact`.company_name), 99999),
`tabContact`.idx desc, `tabContact`.full_name
limit %(start)s, %(page_len)s """,
limit %(page_len)s offset %(start)s """,
{
"txt": "%" + txt + "%",
"_txt": txt.replace("%", ""),