fix: sql syntax error in get_project_name method (#26145)

This commit is contained in:
Subin Tom 2021-06-22 14:26:36 +05:30 committed by GitHub
parent c6939f37d4
commit 943b46a759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,7 +315,7 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select {fields} from `tabProject`
where
`tabProject`.status not in ("Completed", "Cancelled")
and {cond} {match_cond} {scond}
and {cond} {scond} {match_cond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
idx desc,