Merge pull request #66 from lca2017/chrisjrn/session_chair
Chrisjrn/session chair
This commit is contained in:
commit
6458f4d436
2 changed files with 8 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue