From 5a62375ee54a44b7fe031eda6624bd73d36faaaa Mon Sep 17 00:00:00 2001 From: pratu16x7 Date: Thu, 9 Mar 2017 15:55:28 +0530 Subject: [PATCH] generic doctype check --- frappe/utils/global_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/global_search.py b/frappe/utils/global_search.py index dd52a0c83c..a7ffb24ab1 100644 --- a/frappe/utils/global_search.py +++ b/frappe/utils/global_search.py @@ -31,7 +31,7 @@ def update_global_search(doc): `frappe.flags.update_global_search` from given doc :param doc: Document to be added to global search''' - if cint(doc.meta.istable) == 1 and not doc.parenttype.startswith("__"): + if cint(doc.meta.istable) == 1 and frappe.db.exists("DocType", doc.parenttype): d = frappe.get_doc(doc.parenttype, doc.parent) update_global_search(d) return