From e120f7a691202c666568224d49775acd964b1341 Mon Sep 17 00:00:00 2001 From: James Polley Date: Fri, 19 Jan 2018 08:05:54 +1100 Subject: [PATCH] Decode the image so it can be re-encoded #sigh --- vendor/regidesk/regidesk/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/regidesk/regidesk/views.py b/vendor/regidesk/regidesk/views.py index 79734090..ba9e02ee 100644 --- a/vendor/regidesk/regidesk/views.py +++ b/vendor/regidesk/regidesk/views.py @@ -240,7 +240,8 @@ def send_boarding_pass(bpass, user): msg.mixed_subtype="related" if bpass.html_body: msg.attach_alternative(bpass.html_body, "text/html") - msg.attach(filename="qrcode.png", content=user.checkin.qrcode, mimetype="image/png") + qrcode = base64.b64decode(user.checkin.qrcode) + msg.attach(filename="qrcode.png", content=qrcode, mimetype="image/png") msg.send() bpass.sent = datetime.now()