Changeset - 34e250322c07
[Not reviewed]
0 1 0
Christopher Neugebauer - 7 years ago 2017-01-10 10:23:07
chrisjrn@gmail.com
Adds chair() method to sessions so that templates can easily determine who the chair is.
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
symposion/schedule/models.py
Show inline comments
...
 
@@ -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()
0 comments (0 inline, 0 general)