Merge pull request #36099 from AarDG10/fix-contact-pg

fix(contact): ensure query is compatible with postgres
This commit is contained in:
Aarol D'Souza 2026-01-20 12:18:56 +05:30 committed by GitHub
commit 8d18a47bad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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("%", ""),