Migratelists hotfix

parent 96acee11
...@@ -14,16 +14,16 @@ class Command(BaseCommand): ...@@ -14,16 +14,16 @@ class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
if not settings.MIGRATION_KEY: if not settings.MIGRATION_KEY:
raise ImproperlyConfigured("MIGRATION_KEY not specified") raise ImproperlyConfigured("MIGRATION_KEY not specified")
url = "https://thalia.nu/api/export_mail.php?apikey={}&lists".format( url = ("https://oud.thalia.nu/api/export_mail.php"
settings.MIGRATION_KEY "?apikey={}&lists".format(
) settings.MIGRATION_KEY))
lines = requests.get(url).text.split('\n') lines = requests.get(url).text.split('\n')
for lID in lines: for lID in lines:
if ':' in lID: if ':' in lID:
raise Exception("Turns out we actually used aliasses.") raise Exception("Turns out we actually used aliasses.")
if lID.isnumeric(): if lID.isnumeric():
url = ("https://thalia.nu/api/export_mail.php" url = ("https://oud.thalia.nu/api/export_mail.php"
"?apikey={}&list={}".format( "?apikey={}&list={}".format(
lID, lID,
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