fix: Eliminate broken & impermissible links from get_linked_docs
This commit is contained in:
parent
6edb1f09e4
commit
38fbe76ebf
1 changed files with 7 additions and 1 deletions
|
|
@ -380,9 +380,15 @@ def get_linked_docs(doctype: str, name: str, linkinfo: Dict = None) -> Dict[str,
|
|||
for dt, link in linkinfo.items():
|
||||
filters = []
|
||||
link["doctype"] = dt
|
||||
link_meta_bundle = frappe.desk.form.load.get_meta_bundle(dt)
|
||||
try:
|
||||
link_meta_bundle = frappe.desk.form.load.get_meta_bundle(dt)
|
||||
except Exception:
|
||||
continue
|
||||
linkmeta = link_meta_bundle[0]
|
||||
|
||||
if not linkmeta.has_permission():
|
||||
continue
|
||||
|
||||
if not linkmeta.get("issingle"):
|
||||
fields = [d.fieldname for d in linkmeta.get("fields", {
|
||||
"in_list_view": 1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue