fix: mysql syntax issue

(cherry picked from commit 4d9bbd4c9c06811086e0ae4e2c16763fe7d171a3)
This commit is contained in:
Bhavesh Maheshwari 2022-11-03 10:59:20 +05:30 committed by Mergify
parent cbf82872fb
commit f4779df9b3

View File

@ -699,7 +699,8 @@ def get_pending_work_orders(doctype, txt, searchfield, start, page_length, filte
AND `company` = %(company)s
AND `name` like %(txt)s
ORDER BY
(case when locate(%(_txt)s, name) > 0 then locate(%(_txt)s, name) else 99999 end) name
(case when locate(%(_txt)s, name) > 0 then locate(%(_txt)s, name) else 99999 end),
name
LIMIT
%(start)s, %(page_length)s""",
{