Allow accessing URL to generate boarding pass

Only needed some code fixups to function
This commit is contained in:
Sachi King 2018-01-21 16:14:22 +11:00
parent 568536532c
commit 5a085535c0

View file

@ -52,7 +52,8 @@ def boardingpass(request):
'default template to use. This page has similar information to '
'the boarding pass - please check back later.')
return redirect('/tickets/review')
prepare_boarding_pass(request, templates[0])
prepare_boarding_pass(request.user, templates[0])
checkin = CheckIn.objects.get_or_create(user=user)[0]
boardingpass = checkin.boardingpass
qrcode_url = request.build_absolute_uri(reverse("regidesk:checkin_png", args=[checkin.code]))
@ -81,7 +82,9 @@ def boarding_overview(request, boarding_state="pending"):
price__gte=0
)
ticketholders = { ticket.invoice.user: ticket.product.name for ticket in tickets }
print(datetime.now())
ticketholders = ( ticket.invoice.user for ticket in tickets )
print(datetime.now())
attendees = people.Attendee.objects.select_related(
"attendeeprofilebase",
@ -194,7 +197,7 @@ def prepare_boarding_pass(user, template, attendee=None):
if attendee:
user = attendee.user
else:
user = request.user
user = user
attendee=user.attendee
checkin = CheckIn.objects.get_or_create(user=user)
ctx = {