From d780c8ae229f1f2f63c1e136e2c2873d6bcb5e29 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 9 Nov 2015 14:30:16 +0530 Subject: [PATCH] [fix] the case when linked with custom doctype --- frappe/desk/form/linked_with.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frappe/desk/form/linked_with.py b/frappe/desk/form/linked_with.py index 4c7220f797..9911acc526 100644 --- a/frappe/desk/form/linked_with.py +++ b/frappe/desk/form/linked_with.py @@ -108,7 +108,11 @@ def _get_linked_doctypes(doctype): ret[dt] = {"get_parent": True} for dt in ret.keys(): - doctype_module = load_doctype_module(dt) + try: + doctype_module = load_doctype_module(dt) + except ImportError: + # in case of Custom DocType + continue if getattr(doctype_module, "exclude_from_linked_with", False): del ret[dt]