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 Oct 10, 2024
1 parent b72dd30 commit 22c0e17
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 @@ -547,7 +547,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 22c0e17

Please sign in to comment.