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

This commit is contained in:
Chris Dodge
2012-10-14 21:29:00 -04:00
parent 1b4f569c08
commit 4ac1a74117

View File

@@ -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,