Added a property method to return what the 'session' field used to return,
but based on the 'sessions' m2m field filtered with the meeting agenda. This is right for the main meeting agenda, but not for personal schedule layouts, so this isn't a final fix. - Legacy-Id: 6436
This commit is contained in:
parent
d3983b668a
commit
9be2f712b8
|
@ -248,6 +248,11 @@ class TimeSlot(models.Model):
|
|||
#
|
||||
|
||||
@property
|
||||
def session(self):
|
||||
sessions = self.sessions.filter(scheduledsession__schedule=self.meeting.agenda)
|
||||
session = sessions.get() if sessions.count() == 1 else None
|
||||
return session
|
||||
|
||||
def time_desc(self):
|
||||
return u"%s-%s" % (self.time.strftime("%H%M"), (self.time + self.duration).strftime("%H%M"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue