From 7a7aa9587464c1c9201930ee93d757b4fbeebf77 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Sun, 25 Sep 2016 09:56:16 +1000 Subject: [PATCH] Fixes issue with accessing stripe page without access code. --- registripe/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/registripe/views.py b/registripe/views.py index 575559fa..361e49e1 100644 --- a/registripe/views.py +++ b/registripe/views.py @@ -57,7 +57,10 @@ def card(request, invoice_id, access_code=None): if not inv.can_view(user=request.user, access_code=access_code): raise Http404() - to_invoice = redirect("invoice", inv.invoice.id, access_code) + args = [inv.invoice.id] + if access_code: + args.append(access_code) + to_invoice = redirect("invoice", *args) if inv.invoice.balance_due() <= 0: return to_invoice