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 %}