Skip to content

Commit

Permalink
TutorGroup has a year now!
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortal committed Jul 9, 2015
1 parent 5b04a68 commit aef41d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tutormail/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_group(self, group_name):

# Is name a tutorgroup?
try:
group = TutorGroup.objects.get(handle=group_name)
group = TutorGroup.objects.get(handle=group_name, year=year)
except TutorGroup.DoesNotExist:
return None

Expand All @@ -141,6 +141,8 @@ def get_group(self, group_name):
def get_group_emails(self, name, groups):
emails = []
for group, year in groups:
# TODO: After TutorGroup has a year field, this year-filter is
# perhaps unwanted/unnecessary.
group_tutors = Tutor.objects.filter(
groups=group, year=year,
early_termination__isnull=True)
Expand Down

0 comments on commit aef41d2

Please sign in to comment.