Skip to content

Commit 09a64a9

Browse files
committed
Flake8
1 parent bd92fbb commit 09a64a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web/tomo_statistics/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from attempts.models import Attempt, HistoricalAttempt
22
from courses.models import Course, ProblemSet
33
from django.contrib.auth.decorators import login_required
4+
from django.core.exceptions import ObjectDoesNotExist
45
from django.shortcuts import get_object_or_404, render
56
from problems.models import Part
67
from 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(

0 commit comments

Comments
 (0)