From 5d2a1ea47a2be007b56a658dbbfe4450f3051d3a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 25 Aug 2020 14:29:08 +0530 Subject: [PATCH] fix(minor): handle importing of doctype when links are missing --- frappe/model/base_document.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index e94ce18e6b..db2b4eff85 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -302,7 +302,8 @@ class BaseDocument(object): try: return self.meta.get_field(fieldname).options except AttributeError: - print('Unable to find options for {}'.format(fieldname)) + if self.doctype == 'DocType': + return dict(links='DocType Link', actions='DocType Action').get(fieldname) raise def get_parentfield_of_doctype(self, doctype):