Pass the actual ID and not all kwargs :P

This commit is contained in:
Víðir Valberg Guðmundsson 2016-05-10 20:59:27 +02:00
parent ba201d9cf6
commit c4a907890c

View file

@ -77,7 +77,9 @@ class EpayView(TemplateView):
template_name = 'tickets/epay_form.html' template_name = 'tickets/epay_form.html'
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
ticket = Ticket.objects.get(pk=kwargs).select_related('ticket_type') ticket = Ticket.objects.get(
pk=kwargs.get('ticket_id')
).select_related('ticket_type')
accept_url = ticket.get_absolute_url() accept_url = ticket.get_absolute_url()
amount = ticket.ticket_type.price * 100 amount = ticket.ticket_type.price * 100
order_id = str(ticket.pk) order_id = str(ticket.pk)