Skip to content

Commit

Permalink
Fix: Unhandled bug when batch deleting students by emails (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reimirno authored Mar 13, 2024
1 parent 52d99af commit af44e29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ axe/
gcp-service-account-credentials.json

# bootstrap
setup.sh
setup*.sh
2 changes: 1 addition & 1 deletion server/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def delete_students(exam):
if not form.use_all_emails.data:
emails = [x for x in str_set_to_set(form.emails.data) if x]
students = Student.query.filter(
Student.email.in_(emails) & Student.exam_id == exam.id)
Student.email.in_(emails) & (Student.exam_id == exam.id))
else:
students = Student.query.filter_by(exam_id=exam.id)
deleted = {student.email for student in students}
Expand Down

0 comments on commit af44e29

Please sign in to comment.