From ebe0faf771e0c76741507a8799a232b285ceb8a3 Mon Sep 17 00:00:00 2001 From: James Polley Date: Wed, 16 Jan 2019 05:01:03 +0000 Subject: [PATCH] Send errors from boarding pass emails to error log Help troubleshoot errors --- 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 c045e321..337dca8d 100644 --- a/vendor/regidesk/regidesk/views.py +++ b/vendor/regidesk/regidesk/views.py @@ -281,7 +281,8 @@ def boarding_send(request): if user in boarding_users: send_boarding_pass(user, bpass) messages.success(request, "Sent boarding pass to %s" % attendee) - except: + except Exception as err: + logging.error("Error sending boarding pass for %s: %s", (attendee, err)) messages.warning(request, "Could not send boarding pass to %s" % attendee) request.session['boarding_attendees'].remove(attendee.pk)