Fix bug in materials page introduced in previous commit with non-WG groups
- Legacy-Id: 17124
This commit is contained in:
parent
3957743b85
commit
defc50caf5
|
@ -940,6 +940,10 @@ class Session(models.Model):
|
|||
def drafts(self):
|
||||
return list(self.materials.filter(type='draft'))
|
||||
|
||||
# The utilities below are used in the proceedings and materials
|
||||
# templates, and should be moved there - then we could also query
|
||||
# out the needed information in a few passes and speed up those
|
||||
# pages.
|
||||
def all_meeting_sessions_for_group(self):
|
||||
from ietf.meeting.utils import add_event_info_to_session_qs
|
||||
if self.group.type_id in ['wg','rg','ag']:
|
||||
|
|
|
@ -138,10 +138,10 @@ def materials(request, num=None):
|
|||
|
||||
schedule = get_schedule(meeting, None)
|
||||
|
||||
sessions = Session.objects.filter(
|
||||
sessions = add_event_info_to_session_qs(Session.objects.filter(
|
||||
meeting__number=meeting.number,
|
||||
timeslotassignments__schedule=schedule
|
||||
).distinct().select_related('meeting__schedule', 'group__state', 'group__parent')
|
||||
).distinct().select_related('meeting__schedule', 'group__state', 'group__parent'))
|
||||
|
||||
plenaries = sessions.filter(name__icontains='plenary')
|
||||
ietf = sessions.filter(group__parent__type__slug = 'area').exclude(group__acronym='edu')
|
||||
|
|
Loading…
Reference in a new issue