From 72ce53bb6a5fc5f40d3c85dceb4b8f4a06b8d072 Mon Sep 17 00:00:00 2001 From: AarDG10 Date: Tue, 20 Jan 2026 11:48:09 +0530 Subject: [PATCH] fix(contact): ensure query is compatible with postgres --- frappe/contacts/doctype/contact/contact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/contacts/doctype/contact/contact.py b/frappe/contacts/doctype/contact/contact.py index 3ad5e54c62..5859746f1e 100644 --- a/frappe/contacts/doctype/contact/contact.py +++ b/frappe/contacts/doctype/contact/contact.py @@ -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("%", ""),