From 6717b07ab9e4bc3720211f1dc6b527e6908fedb7 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sat, 3 Jun 2023 22:07:54 +0530 Subject: [PATCH] perf(customize_form): rebuild global search in bg --- frappe/custom/doctype/customize_form/customize_form.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/custom/doctype/customize_form/customize_form.py b/frappe/custom/doctype/customize_form/customize_form.py index 9e6b8990d5..9aa61869d3 100644 --- a/frappe/custom/doctype/customize_form/customize_form.py +++ b/frappe/custom/doctype/customize_form/customize_form.py @@ -192,7 +192,9 @@ class CustomizeForm(Document): if self.flags.rebuild_doctype_for_global_search: frappe.enqueue( - "frappe.utils.global_search.rebuild_for_doctype", now=True, doctype=self.doc_type + "frappe.utils.global_search.rebuild_for_doctype", + doctype=self.doc_type, + enqueue_after_commit=True, ) def set_property_setters(self):