use .read() so we pass the actual bytes from the file

This commit is contained in:
Thomas Steen Rasmussen 2019-08-08 11:12:28 +02:00
parent 17ff6efb8f
commit f594815685

View file

@ -27,7 +27,7 @@ def add_sponsorticket_email(ticket):
to_recipients=ticket.sponsor.ticket_email, to_recipients=ticket.sponsor.ticket_email,
formatdict=formatdict, formatdict=formatdict,
subject=subject, subject=subject,
attachment=f, attachment=f.read(),
attachment_filename=filename, attachment_filename=filename,
) )