fix: dont skip if any record is present
This commit is contained in:
parent
78df15970c
commit
d943c9e463
1 changed files with 4 additions and 1 deletions
|
|
@ -506,7 +506,10 @@ def get_linked_docs(doctype: str, name: str, linkinfo: dict | None = None) -> di
|
|||
filters.append([linked_doctype, doctype_fieldname, "=", doctype])
|
||||
# check for child table that no one links to
|
||||
if linked_doctype_meta.istable:
|
||||
if not frappe.db.exists("DocField", {"options": linked_doctype}):
|
||||
if not (
|
||||
frappe.db.exists("DocField", {"options": linked_doctype})
|
||||
or frappe.db.exists(linked_doctype, {"parenttype": doctype, "parent": name})
|
||||
):
|
||||
continue
|
||||
ret = frappe.get_list(
|
||||
doctype=linked_doctype, fields=fields, filters=filters, or_filters=or_filters, order_by=None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue