diff --git a/symposion/schedule/models.py b/symposion/schedule/models.py index a5074252..c4807df6 100644 --- a/symposion/schedule/models.py +++ b/symposion/schedule/models.py @@ -270,6 +270,12 @@ class Session(models.Model): else: return None + def chair(self): + for role in self.sessionrole_set.all(): + if role.role == SessionRole.SESSION_ROLE_CHAIR: + return role + return None + def __str__(self): start = self.start() end = self.end() diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index 4afaa473..03533fce 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -350,8 +350,8 @@ def session_detail(request, session_id): runner_denied = True if request.method == "POST" and request.user.is_authenticated(): - if not hasattr(request.user, "profile") or not request.user.profile.is_complete: - response = redirect("profile_edit") + if not hasattr(request.user, "attendee") or not request.user.attendee.completed_registration: + response = redirect("guided_registration") response["Location"] += "?next=%s" % request.path return response