From 478b328e41a81aee78158bf6672c3247c833bb83 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Fri, 25 Mar 2016 12:50:59 +1100 Subject: [PATCH] Uses the completed_registration flag on the Attendee model --- registrasion/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/registrasion/views.py b/registrasion/views.py index 64f4e4b1..73d04150 100644 --- a/registrasion/views.py +++ b/registrasion/views.py @@ -25,8 +25,11 @@ def guided_registration(request, page_id=0): dashboard = redirect("dashboard") next_step = redirect("guided_registration") - # Step 1: Fill in a badge attendee = rego.Attendee.get_instance(request.user) + if attendee.completed_registration: + return dashboard + + # Step 1: Fill in a badge profile = rego.BadgeAndProfile.get_instance(attendee) if profile is None: @@ -47,6 +50,8 @@ def guided_registration(request, page_id=0): if len(cats) == 0: # We've filled in every category + attendee.completed_registration = True + attendee.save() return dashboard ret = product_category(request, cats[0].id)