Verified Commit 6d26d1d6 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Make sure the mentor mailinglist uses the next lecture year from January till...

Make sure the mentor mailinglist uses the next lecture year from January till September, otherwise the recipients are those of the intro of last year
parent 8f57d9b8
......@@ -23,8 +23,12 @@ def get_automatic_lists():
.prefetch_related('member__user'))
active_members = [x.member for x in active_committee_memberships]
lectureyear = datetime_to_lectureyear(timezone.now())
# Change to next lecture year after December
if 0 < timezone.now().month < 9:
lectureyear += 1
active_mentorships = Mentorship.objects.filter(
year=datetime_to_lectureyear(timezone.now()))
year=lectureyear)
mentors = [x.member for x in active_mentorships]
lists = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment