generic doctype check

This commit is contained in:
pratu16x7 2017-03-09 15:55:28 +05:30
parent 82c122ecea
commit 5a62375ee5

View file

@ -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