chore: handle invalid connections conf for internal links (#22486)

* chore: handle invalid connections conf for internal links

* chore: remove unnecessary None
This commit is contained in:
Anand Baburajan 2023-09-20 16:44:51 +05:30 committed by GitHub
parent 67376e26d4
commit 5004374ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -311,7 +311,7 @@ def get_internal_links(doc, link, link_doctype):
elif isinstance(link, list):
# get internal links in child documents
table_fieldname, link_fieldname = link
for row in doc.get(table_fieldname):
for row in doc.get(table_fieldname) or []:
value = row.get(link_fieldname)
if value and value not in names:
names.append(value)