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

This commit is contained in:
Subin Tom 2021-06-22 16:26:19 +05:30 committed by GitHub
parent 9f15ebe711
commit 889140fd8c
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,