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:
|
else:
|
||||||
return None
|
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):
|
def __str__(self):
|
||||||
start = self.start()
|
start = self.start()
|
||||||
end = self.end()
|
end = self.end()
|
||||||
|
|
|
@ -350,8 +350,8 @@ def session_detail(request, session_id):
|
||||||
runner_denied = True
|
runner_denied = True
|
||||||
|
|
||||||
if request.method == "POST" and request.user.is_authenticated():
|
if request.method == "POST" and request.user.is_authenticated():
|
||||||
if not hasattr(request.user, "profile") or not request.user.profile.is_complete:
|
if not hasattr(request.user, "attendee") or not request.user.attendee.completed_registration:
|
||||||
response = redirect("profile_edit")
|
response = redirect("guided_registration")
|
||||||
response["Location"] += "?next=%s" % request.path
|
response["Location"] += "?next=%s" % request.path
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue