From 664d53123ceb357a4a6b7c804fa4ae3a267eecf7 Mon Sep 17 00:00:00 2001 From: bansodegaurav8848 Date: Thu, 31 Oct 2024 15:37:18 +0530 Subject: [PATCH] fix: replace comma to the blank value --- frappe/desk/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/desk/search.py b/frappe/desk/search.py index 666b351802ba..30fdc3a5504a 100644 --- a/frappe/desk/search.py +++ b/frappe/desk/search.py @@ -170,7 +170,7 @@ def search_widget( order_by = f"`tab{doctype}`.idx desc, {order_by_based_on_meta}" if not meta.translated_doctype: - _txt = frappe.db.escape((txt or "").replace("%", "").replace("@", "")) + _txt = frappe.db.escape((txt or "").replace("%", "").replace("@", "").replace(",","")) # locate returns 0 if string is not found, convert 0 to null and then sort null to end in order by _relevance = f"(1 / nullif(locate({_txt}, `tab{doctype}`.`name`), 0))" formatted_fields.append(f"""{_relevance} as `_relevance`""")