From 015c35cbd45bac851b782ebfccacf82c3b9dadf0 Mon Sep 17 00:00:00 2001 From: Julen Ruiz Aizpuru Date: Mon, 1 May 2017 13:21:11 -0700 Subject: [PATCH] Invoices: pass mime type in attachments too --- pootle/apps/reports/models/invoice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pootle/apps/reports/models/invoice.py b/pootle/apps/reports/models/invoice.py index 8bd7c75db0..f606ced88e 100644 --- a/pootle/apps/reports/models/invoice.py +++ b/pootle/apps/reports/models/invoice.py @@ -364,7 +364,10 @@ def send_by_email(self, override_to=None, override_bcc=None): override_to=override_to, override_bcc=override_bcc).send() - attachments = [file[0] for file in self.files if 'html' not in file[1]] + attachments = [ + (file[0], file[1]) # file path, mime type + for file in self.files if 'html' not in file[1] + ] count = 0 count += UserPaymentEmail(self.id, self.conf, ctx, override_to=override_to,