From 8dafe6256cfdf56f595f68246417ea7fbb8abcc5 Mon Sep 17 00:00:00 2001 From: prssanna Date: Sat, 18 Apr 2020 21:32:16 +0530 Subject: [PATCH] fix: check if column is a dict --- frappe/desk/query_report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/desk/query_report.py b/frappe/desk/query_report.py index a08667161a..f994dc0d30 100644 --- a/frappe/desk/query_report.py +++ b/frappe/desk/query_report.py @@ -299,7 +299,7 @@ def export_query(): _("You can try changing the filters of your report.")) return - data.columns = [col for col in data.columns if not col.get('hidden')] + data.columns = [col for col in data.columns if isinstance(col, dict) and not col.get('hidden')] columns = get_columns_dict(data.columns) from frappe.utils.xlsxutils import make_xlsx @@ -311,7 +311,7 @@ def export_query(): frappe.response['type'] = 'binary' -def build_xlsx_data(columns, data, visible_idx,include_indentation): +def build_xlsx_data(columns, data, visible_idx, include_indentation): result = [[]] # add column headings