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
thalia
concrexit
Commits
9b58200f
Unverified
Commit
9b58200f
authored
Aug 28, 2018
by
Sébastiaan Versteeg
Committed by
Thom Wiggers
Aug 28, 2018
Browse files
Filter out members without email address in members email tests
parent
13382025
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/members/emails.py
View file @
9b58200f
...
...
@@ -21,6 +21,7 @@ def send_membership_announcement(dry_run=False):
members
=
(
Member
.
current_members
.
filter
(
membership__until__isnull
=
True
)
.
exclude
(
membership__type
=
Membership
.
HONORARY
)
.
exclude
(
email
=
''
)
.
distinct
())
with
mail
.
get_connection
()
as
connection
:
...
...
@@ -58,7 +59,7 @@ def send_information_request(dry_run=False):
:param dry_run: does not really send emails if True
"""
members
=
Member
.
current_members
.
all
()
members
=
Member
.
current_members
.
all
()
.
exclude
(
email
=
''
)
with
mail
.
get_connection
()
as
connection
:
for
member
in
members
:
...
...
@@ -101,6 +102,7 @@ def send_expiration_announcement(dry_run=False):
members
=
(
Member
.
current_members
.
filter
(
membership__until__lte
=
expiry_date
)
.
exclude
(
membership__until__isnull
=
True
)
.
exclude
(
email
=
''
)
.
distinct
())
with
mail
.
get_connection
()
as
connection
:
...
...
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