Commit 80a9bfd7 authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Merge branch 'release/1.0.2' into 'master'

Backmerge Release/1.0.2

See merge request !239
parents 3f42fc25 159928db
......@@ -14,16 +14,16 @@ class Command(BaseCommand):
def handle(self, *args, **options):
if not settings.MIGRATION_KEY:
raise ImproperlyConfigured("MIGRATION_KEY not specified")
url = "https://thalia.nu/api/export_mail.php?apikey={}&lists".format(
settings.MIGRATION_KEY
)
url = ("https://oud.thalia.nu/api/export_mail.php"
"?apikey={}&lists".format(
settings.MIGRATION_KEY))
lines = requests.get(url).text.split('\n')
for lID in lines:
if ':' in lID:
raise Exception("Turns out we actually used aliasses.")
if lID.isnumeric():
url = ("https://thalia.nu/api/export_mail.php"
url = ("https://oud.thalia.nu/api/export_mail.php"
"?apikey={}&list={}".format(
settings.MIGRATION_KEY,
lID,
......
from django.core import validators
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from activemembers.models import Committee
......@@ -24,7 +25,8 @@ class MailingList(models.Model):
yield member.user.email
for committee in self.committees.all().prefetch_related("members"):
for member in committee.members.all():
for member in committee.members.exclude(
commiteemembership__until__lt=timezone.now().date()):
yield member.user.email
for address in self.addresses.all():
......
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