if files condition restored

This commit is contained in:
Pawel M 2016-12-16 10:36:00 +01:00
parent fc0ae58420
commit 97b3444a92

View File

@ -120,6 +120,7 @@ def send_templated_mail(template_name,
recipients, bcc=bcc)
msg.attach_alternative(html_part, "text/html")
if files:
for filename, filefield in files:
if six.PY3:
msg.attach_file(filefield.path)