diff --git a/frappe/desk/query_report.py b/frappe/desk/query_report.py index d2b7591574..f259f39de4 100644 --- a/frappe/desk/query_report.py +++ b/frappe/desk/query_report.py @@ -293,7 +293,7 @@ def has_match(row, linked_doctypes, doctype_match_filters, ref_doctype, if_owner if dt=="User" and columns_dict[idx]==columns_dict.get("owner"): continue - if dt in match_filters and row[idx] not in match_filters[dt] and frappe.db.exists(dt, row[idx]): + if dt in match_filters and row.get(idx) not in match_filters.get(dt) and frappe.db.exists(dt, row.get(idx)): match = False break