Skip to content

Commit 2bf7481

Browse files
committed
Changed a list of tuples so as to always make them sortable. Fixes an issue with the session video URL API. This is the equivalent of [18340] for this API endpoint.
- Legacy-Id: 18341 Note: SVN reference [18340] has been migrated to Git commit 27eab28
1 parent 27eab28 commit 2bf7481

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
@@ -3020,14 +3020,14 @@ def err(code, text):
30203020
sessions = sessions.filter(group__acronym=acronym)
30213021
if not sessions.exists():
30223022
return err(400, "No sessions found in meeting '%s' for group '%s'" % (number, acronym))
3023-
session_times = [ (s.official_timeslotassignment().timeslot.time, s) for s in sessions if s.official_timeslotassignment() ]
3023+
session_times = [ (s.official_timeslotassignment().timeslot.time, s.id, s) for s in sessions if s.official_timeslotassignment() ]
30243024
session_times.sort()
30253025
item = request.POST.get('item')
30263026
if not item.isdigit():
30273027
return err(400, "Expected a numeric value for 'item', found '%s'" % (item, ))
30283028
n = int(item)-1 # change 1-based to 0-based
30293029
try:
3030-
time, session = session_times[n]
3030+
time, __, session = session_times[n]
30313031
except IndexError:
30323032
return err(400, "No item '%s' found in list of sessions for group" % (item, ))
30333033
url = request.POST.get('url')

0 commit comments

Comments
 (0)