Skip to content

Commit

Permalink
Handle case where current teacher is not in the list of classes
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr committed Jan 26, 2025
1 parent c6810d9 commit 64738a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,8 @@ def get_second_teacher_adventures(self, classes, teacher):
clas.get('second_teachers', [])))}

# We are explicitly not retrieving the current teacher's owned adventures
del shared_teachers[teacher]
if teacher in shared_teachers:
del shared_teachers[teacher]

adventures = []
for teacher, shared_class_name in shared_teachers.items():
Expand Down

0 comments on commit 64738a3

Please sign in to comment.