Use email_filename if defined

This commit is contained in:
Raimon Esteve 2018-01-08 18:19:16 +00:00
commit ccb86602a4
1 changed files with 1 additions and 0 deletions

View File

@ -396,6 +396,7 @@ class Template(ModelSQL, ModelView):
if value.get('reports'):
for report in value['reports']:
ext, data, filename, file_name = report[0:5]
filename = file_name or filename
filename = ext and '%s.%s' % (filename, ext) or filename
content_type, _ = mimetypes.guess_type(filename)
maintype, subtype = (