Commit 4ac1a741 by Chris Dodge

when calling jump_to when location=<id-of-sequential> then Position is being…

when calling jump_to when location=<id-of-sequential> then Position is being computed as None. The redirect then yields a 404. Force Position to be 0 when Position=None
parent 1b4f569c
......@@ -325,6 +325,11 @@ def jump_to(request, course_id, location):
except NoPathToItem:
raise Http404("This location is not in any class: {0}".format(location))
if position is None:
return redirect('courseware_section', course_id=course_id,
chapter=chapter,
section=section)
# Rely on index to do all error handling and access control.
return redirect('courseware_position',
course_id=course_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment