Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Joost Rijneveld
concrexit
Commits
78944725
Unverified
Commit
78944725
authored
Dec 08, 2016
by
Thom Wiggers
📐
Browse files
Migratelists hotfix
parent
96acee11
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/mailinglists/management/commands/migratelists.py
View file @
78944725
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment