From 900392efa33132e5390435dca193ab1be8dfd43c Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Tue, 8 Jan 2019 14:09:11 +0530 Subject: [PATCH] fix : Auto email report fix for XLSX and CSV format (#6729) --- frappe/templates/emails/auto_email_report.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frappe/templates/emails/auto_email_report.html b/frappe/templates/emails/auto_email_report.html index e658dd303e..50ab5b1fe3 100644 --- a/frappe/templates/emails/auto_email_report.html +++ b/frappe/templates/emails/auto_email_report.html @@ -1,7 +1,11 @@ {% macro get_alignment(col) %} {%- if col.fieldtype in ('Int', 'Float', 'Currency', 'Check') %} class="text-right" {% endif -%} {% endmacro %} -{% set max_width = '100%' if columns|length > 3 else '600px' %} +{% if columns %} + {% set max_width = '100%' if columns|length > 3 else '600px' %} +{% else %} + {% set max_width = '600px' %} +{% endif %}