Skip to content

Commit d3b4d8c

Browse files
committed
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
1 parent 4afe0b8 commit d3b4d8c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/meeting/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ def json_agenda(request, num=None ):
928928
meeting = get_meeting(num)
929929

930930
sessions = []
931-
room_names = set()
931+
locations = set()
932932
parent_acronyms = set()
933933
assignments = meeting.agenda.assignments.exclude(session__type__in=['lead','offagenda','break','reg'])
934934
# Update the assignments with historic information, i.e., valid at the
@@ -960,7 +960,7 @@ def json_agenda(request, num=None ):
960960
sessdict['start'] = asgn.timeslot.utc_start_time().strftime("%Y-%m-%dT%H:%M:%SZ")
961961
sessdict['duration'] = str(asgn.timeslot.duration)
962962
sessdict['location'] = asgn.room_name
963-
room_names.add(asgn.room_name)
963+
locations.add(asgn.timeslot.location)
964964
if asgn.session.agenda():
965965
sessdict['agenda'] = asgn.session.agenda().href()
966966

@@ -994,7 +994,7 @@ def json_agenda(request, num=None ):
994994
sessions.append(sessdict)
995995

996996
rooms = []
997-
for room in meeting.room_set.filter(name__in=room_names):
997+
for room in locations:
998998
roomdict = dict()
999999
roomdict['id'] = room.pk
10001000
roomdict['objtype'] = 'location'

0 commit comments

Comments
 (0)