diff --git a/frappe/utils/global_search.py b/frappe/utils/global_search.py index 7012b737c0..20309559e3 100644 --- a/frappe/utils/global_search.py +++ b/frappe/utils/global_search.py @@ -137,8 +137,8 @@ def rebuild_for_doctype(doctype): "name": frappe.db.escape(doc.name), "content": frappe.db.escape(' ||| '.join(content or '')), "published": published, - "title": frappe.db.escape(title or '')[:int(frappe.db.VARCHAR_LEN)], - "route": frappe.db.escape(route or '')[:int(frappe.db.VARCHAR_LEN)] + "title": frappe.db.escape((title or '')[:int(frappe.db.VARCHAR_LEN)]), + "route": frappe.db.escape((route or '')[:int(frappe.db.VARCHAR_LEN)]) }) if all_contents: insert_values_for_multiple_docs(all_contents)