From c4a907890cb2edcffadbb5516d1310597f566de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Tue, 10 May 2016 20:59:27 +0200 Subject: [PATCH] Pass the actual ID and not all kwargs :P --- tickets/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tickets/views.py b/tickets/views.py index a0431910..cce269aa 100644 --- a/tickets/views.py +++ b/tickets/views.py @@ -77,7 +77,9 @@ class EpayView(TemplateView): template_name = 'tickets/epay_form.html' 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() amount = ticket.ticket_type.price * 100 order_id = str(ticket.pk)