Send errors from boarding pass emails to error log

Help troubleshoot errors
This commit is contained in:
James Polley 2019-01-16 05:01:03 +00:00 committed by Tobias S
parent ad461f6a06
commit ebe0faf771

View file

@ -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)