Commit f2f3d608 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch '649-automatic-generation-of-board-email-addresses' into 'master'

Resolve "Automatic generation of board email addresses"

Closes #649

See merge request !844
parents 134a379c 00d99502
from django.conf import settings
from django.utils import timezone
from activemembers.models import CommitteeMembership, Mentorship
from activemembers.models import CommitteeMembership, Mentorship, Board
from members.models import Member
from utils.snippets import datetime_to_lectureyear
......@@ -52,6 +52,20 @@ def get_automatic_lists():
for year in range(Board.objects.earliest('since').since.year, lectureyear):
board = Board.objects.get(since__year=year)
if board is not None:
lists += _create_automatic_list(
+ str(board.since.year)[-2:] + str(board.until.year)[-2:],
+ str(board.since.year)[-2:] + str(board.until.year)[-2:]],
[x.member for x in CommitteeMembership.objects
archived=False, moderated=False, multilingual=False
return lists
Supports Markdown
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