Skip to content

Commit

Permalink
One redirect too far
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-codeinstitute committed Mar 5, 2024
1 parent 77fe708 commit dea92ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lms/djangoapps/courseware/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,13 @@ def _redirect_if_course_updated():
elif chapter:
redirect_url = reverse("courseware_chapter", args=(course_id, chapter))
else:
redirect_url = reverse("courseware")
redirect_url = reverse("courseware", args=(course_id,))
raise Redirect(redirect_url)

try:
set_custom_metrics_for_course_key(self.course_key)
self._clean_position()
with modulestore().bulk_operations(self.course_key):

self.view = STUDENT_VIEW
try:
self.course = get_course_with_access(
Expand Down Expand Up @@ -183,7 +182,6 @@ def _redirect_if_course_updated():

return self.render(request)
except CourseAccessRedirect as exception: # pylint: disable=broad-except
_redirect_if_course_updated()
return CourseTabView.handle_exceptions(request, self.course_key, self.course, exception)
except CoursewareAccessException as exception: # pylint: disable=broad-except
_redirect_if_course_updated()
Expand Down

0 comments on commit dea92ae

Please sign in to comment.