[fix] edge case for get_linked_document_type
This commit is contained in:
parent
01334c7a8a
commit
b28bda4beb
1 changed files with 5 additions and 1 deletions
|
|
@ -124,7 +124,11 @@ class FormMeta(Meta):
|
|||
def add_linked_document_type(self):
|
||||
for df in self.get("fields", {"fieldtype": "Link"}):
|
||||
if df.options:
|
||||
df.linked_document_type = frappe.get_meta(df.options).document_type
|
||||
try:
|
||||
df.linked_document_type = frappe.get_meta(df.options).document_type
|
||||
except frappe.DoesNotExistError:
|
||||
# edge case where options="[Select]"
|
||||
pass
|
||||
|
||||
def add_linked_with(self):
|
||||
"""add list of doctypes this doctype is 'linked' with.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue