diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-11-17 11:42:15 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-11-17 11:42:15 +0100 |
commit | 476c2dc16468aab5dd6a46df90c408a80dfb9a6a (patch) | |
tree | 0d447a9b937dd02eda61cbf82584bed23cda7f3e | |
parent | Disable SQLALCHEMY_TRACK_MODIFICATIONS. (diff) | |
download | newspipe-476c2dc16468aab5dd6a46df90c408a80dfb9a6a.tar.gz newspipe-476c2dc16468aab5dd6a46df90c408a80dfb9a6a.tar.bz2 newspipe-476c2dc16468aab5dd6a46df90c408a80dfb9a6a.zip |
simplification
-rw-r--r-- | pyaggr3g470r/views/views.py | 4 |
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, |