aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/views')
-rw-r--r--pyaggr3g470r/views/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index 2e5d01fb..f519acb5 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -610,8 +610,8 @@ def expire_articles():
"""
Delete articles older than the given number of weeks.
"""
- current_time = datetime.datetime.utcnow()
- weeks_ago = current_time - datetime.timedelta(weeks=int(request.args.get('weeks', 10)))
+ weeks_ago = datetime.datetime.utcnow() - \
+ datetime.timedelta(weeks=int(request.args.get('weeks', 10)))
Article.query.filter(
and_(Article.user_id == g.user.id,
or_(Article.date < weeks_ago,
bgstack15