From e9078f31e6a7f5ef61347fe1daf958d619550435 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 26 Mar 2011 18:08:58 +0000 Subject: [PATCH] Merged [2978] from adam@nostrum.com: Fixing bug #636 -- now only displays groups that are actually meeting. - Legacy-Id: 2981 Note: SVN reference [2978] has been migrated to Git commit d81eb7635575f8b6f0b960211dcafe4359369209 --- ietf/meeting/views.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 936ce50a1..19825ce57 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -103,8 +103,16 @@ def agenda_info(num=None): @decorator_from_middleware(GZipMiddleware) def html_agenda(request, num=None): timeslots, update, meeting, venue, ads, plenaryw_agenda, plenaryt_agenda = agenda_info(num) - wgs = IETFWG.objects.filter(status=IETFWG.ACTIVE).order_by('group_acronym__acronym') - rgs = IRTF.objects.all().order_by('acronym') + + + groups_meeting = []; + for slot in timeslots: + for session in slot.sessions(): + groups_meeting.append(session.acronym()) + groups_meeting = set(groups_meeting); + + wgs = IETFWG.objects.filter(status=IETFWG.ACTIVE).filter(group_acronym__acronym__in = groups_meeting).order_by('group_acronym__acronym') + rgs = IRTF.objects.all().filter(acronym__in = groups_meeting).order_by('acronym') areas = Area.objects.filter(status=Area.ACTIVE).order_by('area_acronym__acronym') if settings.SERVER_MODE != 'production' and '_testiphone' in request.REQUEST: