[minor] allow selects in dynamic links
This commit is contained in:
parent
cee86fc03f
commit
4441a69b97
1 changed files with 2 additions and 2 deletions
|
|
@ -262,8 +262,8 @@ def validate_fields(meta):
|
|||
def check_dynamic_link_options(d):
|
||||
if d.fieldtype=="Dynamic Link":
|
||||
doctype_pointer = filter(lambda df: df.fieldname==d.options, fields)
|
||||
if not doctype_pointer or (doctype_pointer[0].fieldtype!="Link") \
|
||||
or (doctype_pointer[0].options!="DocType"):
|
||||
if not doctype_pointer or (doctype_pointer[0].fieldtype not in ("Link", "Select")) \
|
||||
or (doctype_pointer[0].fieldtype=="Link" and doctype_pointer[0].options!="DocType"):
|
||||
frappe.throw(_("Options 'Dynamic Link' type of field must point to another Link Field with options as 'DocType'"))
|
||||
|
||||
def check_illegal_default(d):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue