Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
thalia
concrexit
Commits
205e8b1d
Verified
Commit
205e8b1d
authored
Aug 01, 2019
by
Sébastiaan Versteeg
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rely on timezone.now instead of datetime.now for expiration emails so that tests work
parent
422cd6e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
website/members/emails.py
website/members/emails.py
+1
-2
No files found.
website/members/emails.py
View file @
205e8b1d
...
...
@@ -8,7 +8,6 @@ from django.template import loader
from
django.template.defaultfilters
import
floatformat
from
django.urls
import
reverse
from
django.utils
import
timezone
,
translation
from
django.utils.datetime_safe
import
datetime
from
django.utils.translation
import
ugettext
as
_
from
members.models
import
Member
,
Membership
...
...
@@ -124,7 +123,7 @@ def send_expiration_announcement(dry_run=False):
:param dry_run: does not really send emails if True
"""
expiry_date
=
datetim
e
.
now
()
+
timedelta
(
days
=
31
)
expiry_date
=
timezon
e
.
now
()
+
timedelta
(
days
=
31
)
members
=
(
Member
.
current_members
.
filter
(
membership__until__lte
=
expiry_date
)
.
exclude
(
membership__until__isnull
=
True
)
...
...
Sébastiaan Versteeg
@sversteeg
mentioned in commit
ba3ec29a
·
Aug 01, 2019
mentioned in commit
ba3ec29a
mentioned in commit ba3ec29a46f775d9486914c78d1532a77f026e2d
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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