Skip to content

Commit 27eab28

Browse files
committed
Changed a list of tuples so as to always make them sortable. Fixes an issue with bluesheet uploads for 'groups' like 'ietf' that could have multiple sessions starting at the same time.
- Legacy-Id: 18340
1 parent 57938b0 commit 27eab28

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/meeting/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,14 +3082,14 @@ def err(code, text):
30823082
sessions = sessions.filter(group__acronym=acronym)
30833083
if not sessions.exists():
30843084
return err(400, "No sessions found in meeting '%s' for group '%s'" % (number, acronym))
3085-
session_times = [ (s.official_timeslotassignment().timeslot.time, s) for s in sessions if s.official_timeslotassignment() ]
3085+
session_times = [ (s.official_timeslotassignment().timeslot.time, s.id, s) for s in sessions if s.official_timeslotassignment() ]
30863086
session_times.sort()
30873087
item = request.POST.get('item')
30883088
if not item.isdigit():
30893089
return err(400, "Expected a numeric value for 'item', found '%s'" % (item, ))
30903090
n = int(item)-1 # change 1-based to 0-based
30913091
try:
3092-
time, session = session_times[n]
3092+
time, __, session = session_times[n]
30933093
except IndexError:
30943094
return err(400, "No item '%s' found in list of sessions for group" % (item, ))
30953095
bjson = request.POST.get('bluesheet')

0 commit comments

Comments
 (0)