Merge pull request #9186 from benknowles/patch-3

fix: global search index breaking on long titles
This commit is contained in:
mergify[bot] 2020-01-11 04:35:54 +00:00 committed by GitHub
commit 710ac6b194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,8 +141,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)