From 6cb0d6da77d6abf9ff7d23948fc893c714571433 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 12 May 2017 15:25:31 +0530 Subject: [PATCH] Re-run global search patch (#3271) --- frappe/patches.txt | 2 +- frappe/patches/v8_0/update_records_in_global_search.py | 2 ++ frappe/utils/global_search.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frappe/patches.txt b/frappe/patches.txt index 285c96f4aa..1b2dab39a2 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -12,7 +12,7 @@ frappe.patches.v8_0.drop_in_dialog execute:frappe.reload_doc('core', 'doctype', 'docfield', force=True) #2017-03-03 execute:frappe.reload_doc('core', 'doctype', 'docperm') #2017-03-03 frappe.patches.v8_0.drop_is_custom_from_docperm -frappe.patches.v8_0.update_records_in_global_search +frappe.patches.v8_0.update_records_in_global_search #11-05-2017 frappe.patches.v8_0.update_published_in_global_search execute:frappe.reload_doc('core', 'doctype', 'custom_docperm') execute:frappe.reload_doc('core', 'doctype', 'deleted_document') diff --git a/frappe/patches/v8_0/update_records_in_global_search.py b/frappe/patches/v8_0/update_records_in_global_search.py index 397128c64f..8ee8f36de8 100644 --- a/frappe/patches/v8_0/update_records_in_global_search.py +++ b/frappe/patches/v8_0/update_records_in_global_search.py @@ -1,5 +1,7 @@ +import frappe from frappe.utils.global_search import get_doctypes_with_global_search, rebuild_for_doctype def execute(): + frappe.cache().delete_value('doctypes_with_global_search') for doctype in get_doctypes_with_global_search(with_child_tables=False): rebuild_for_doctype(doctype) diff --git a/frappe/utils/global_search.py b/frappe/utils/global_search.py index c7f8c5ecc9..8d481a814b 100644 --- a/frappe/utils/global_search.py +++ b/frappe/utils/global_search.py @@ -54,7 +54,7 @@ def rebuild_for_doctype(doctype): :param doctype: Doctype ''' def _get_filters(): - filters = frappe._dict({ "docstatus": ["!=", 1] }) + filters = frappe._dict({ "docstatus": ["!=", 2] }) if meta.has_field("enabled"): filters.enabled = 1 if meta.has_field("disabled"):