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
205e8b1d
Verified
Commit
205e8b1d
authored
Aug 01, 2019
by
Sébastiaan Versteeg
Browse files
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
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
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