fix: key error on link_field
This commit is contained in:
parent
fbbdef1e9c
commit
9cdb56ee5e
1 changed files with 5 additions and 1 deletions
|
|
@ -494,7 +494,11 @@ def get_data_for_custom_report(columns, result):
|
|||
doctype = column.get("doctype")
|
||||
|
||||
row_key = link_field.get("fieldname")
|
||||
names = list({row[row_key] for row in result}) or None
|
||||
names = []
|
||||
for row in result:
|
||||
if row.get(row_key):
|
||||
names.append(row.get(row_key))
|
||||
names = list(set(names))
|
||||
|
||||
doc_field_value_map[(doctype, fieldname)] = get_data_for_custom_field(doctype, fieldname, names)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue