aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-11-17 11:42:15 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-11-17 11:42:15 +0100
commit476c2dc16468aab5dd6a46df90c408a80dfb9a6a (patch)
tree0d447a9b937dd02eda61cbf82584bed23cda7f3e /pyaggr3g470r
parentDisable SQLALCHEMY_TRACK_MODIFICATIONS. (diff)
downloadnewspipe-476c2dc16468aab5dd6a46df90c408a80dfb9a6a.tar.gz
newspipe-476c2dc16468aab5dd6a46df90c408a80dfb9a6a.tar.bz2
newspipe-476c2dc16468aab5dd6a46df90c408a80dfb9a6a.zip
simplification
Diffstat (limited to 'pyaggr3g470r')
-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