fix(minor): handle importing of doctype when links are missing

This commit is contained in:
Rushabh Mehta 2020-08-25 14:29:08 +05:30
parent ebc961cf84
commit 5d2a1ea47a

View file

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