Skip to content

Commit

Permalink
Updated the view logic to fix the crashing behavior on start
Browse files Browse the repository at this point in the history
  • Loading branch information
Rutvikrj26 committed Jul 16, 2024
1 parent c710794 commit 8460138
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions physionet-django/training/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ def current_module_block(request, training_slug, module_order, order):
return redirect('current_module_block', training_slug,
module_order, module_progress.get_next_content_or_quiz().order)

# if the order is smaller than the minimum order, redirect to the minimum order
if order < module_minimum_order:
return redirect('current_module_block', training_slug, module_order, module_minimum_order)

# check if this is a post request, if so, handle the update of the submission
if request.method == 'POST':
# if it contains choice, then it is a quiz
Expand Down

0 comments on commit 8460138

Please sign in to comment.