File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11from attempts .models import Attempt , HistoricalAttempt
22from courses .models import Course , ProblemSet
33from django .contrib .auth .decorators import login_required
4+ from django .core .exceptions import ObjectDoesNotExist
45from django .shortcuts import get_object_or_404 , render
56from problems .models import Part
67from tomo_statistics .statistics_utils import (
@@ -170,13 +171,13 @@ def compare_solutions(request, course_pk):
170171 part .attempt_student1 = attempts .get (
171172 user = first_student , part = part
172173 )
173- except :
174+ except ObjectDoesNotExist :
174175 part .attempt_student1 = None
175176 try :
176177 part .attempt_student2 = attempts .get (
177178 user = second_student , part = part
178179 )
179- except :
180+ except ObjectDoesNotExist :
180181 part .attempt_student2 = None
181182
182183 return render (
You can’t perform that action at this time.
0 commit comments