Fix sending boaridng pass issues

This commit is contained in:
Tobias 2019-01-17 18:03:11 +13:00
parent c5ec7e5482
commit ce89d7a40c

View file

@ -274,12 +274,11 @@ def boarding_send(request):
template = BoardingPassTemplate.objects.get(pk=template_pk)
for attendee in attendees:
try:
user = attendee.user
bpass = prepare_boarding_pass(user, template, attendee)
if user in boarding_users:
send_boarding_pass(user, bpass)
send_boarding_pass(bpass, user)
messages.success(request, "Sent boarding pass to %s" % attendee)
except Exception as err:
logging.error("Error sending boarding pass for %s: %s", (attendee, err))