diff --git a/participation/management/commands/delete_old_sympa_lists.py b/participation/management/commands/delete_old_sympa_lists.py index f1d6f87..2fa593e 100644 --- a/participation/management/commands/delete_old_sympa_lists.py +++ b/participation/management/commands/delete_old_sympa_lists.py @@ -2,10 +2,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later from django.conf import settings from django.core.management import BaseCommand -from django.db.models import Q -from django.template.defaultfilters import slugify -from participation.models import Team, Tournament -from registration.models import ParticipantRegistration, VolunteerRegistration from tfjm.lists import get_sympa_client @@ -22,7 +18,7 @@ class Command(BaseCommand): sympa = get_sympa_client() - for mailing_list in sympa.all_lists(): - address = mailing_list.list_address - if address.startswith("equipe") or address.startswith("orga") or address.startswith("jury"): - sympa.delete_list(address) + for mailing_list in sympa.all_lists(): + address = mailing_list.list_address + if address.startswith("equipe") or address.startswith("orga") or address.startswith("jury"): + sympa.delete_list(address)