From d3b4d8c18badee38ac3c2c1f41810bc4f1c35471 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 25 May 2017 14:13:00 +0000 Subject: [PATCH] Fixed a bug for /meeting/*/agenda.json where multiple entries for a room name could occur, even if only one of them were referenced by sessions. - Legacy-Id: 13424 --- ietf/meeting/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 58cf21f5d..81f4a105d 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -928,7 +928,7 @@ def json_agenda(request, num=None ): meeting = get_meeting(num) sessions = [] - room_names = set() + locations = set() parent_acronyms = set() assignments = meeting.agenda.assignments.exclude(session__type__in=['lead','offagenda','break','reg']) # Update the assignments with historic information, i.e., valid at the @@ -960,7 +960,7 @@ def json_agenda(request, num=None ): sessdict['start'] = asgn.timeslot.utc_start_time().strftime("%Y-%m-%dT%H:%M:%SZ") sessdict['duration'] = str(asgn.timeslot.duration) sessdict['location'] = asgn.room_name - room_names.add(asgn.room_name) + locations.add(asgn.timeslot.location) if asgn.session.agenda(): sessdict['agenda'] = asgn.session.agenda().href() @@ -994,7 +994,7 @@ def json_agenda(request, num=None ): sessions.append(sessdict) rooms = [] - for room in meeting.room_set.filter(name__in=room_names): + for room in locations: roomdict = dict() roomdict['id'] = room.pk roomdict['objtype'] = 'location'