Skip to content

Commit

Permalink
check_exam_ticket: filter out revoked tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Sep 22, 2023
1 parent 572d424 commit 5b53f10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion course/exam.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@ def check_exam_ticket(
if restrict_to_course is not None:
ticket_kwargs["participation__course"] = restrict_to_course

ticket = ExamTicket.objects.get(
ticket = ExamTicket.objects.exclude(
state=exam_ticket_states.revoked
).get(
participation__user=user,
code=code,
**ticket_kwargs
Expand Down

0 comments on commit 5b53f10

Please sign in to comment.