aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views/article.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pyaggr3g470r/views/article.py b/pyaggr3g470r/views/article.py
index 66cc0f37..a209f888 100644
--- a/pyaggr3g470r/views/article.py
+++ b/pyaggr3g470r/views/article.py
@@ -18,10 +18,9 @@ def articles(feed_id=None, nb_articles=-1):
feed.articles = controllers.ArticleController(g.user.id)\
.read(feed_id=feed.id)\
.order_by(desc("Article.date"))
- if len(feed.articles.all()) <= nb_articles:
- nb_articles = -1
- if nb_articles == -1:
- feed.articles = feed.articles.limit(nb_articles)
+ if len(feed.articles.all()) <= nb_articles or nb_articles == -1:
+ nb_articles = int(1e9)
+ feed.articles = feed.articles.limit(nb_articles)
return render_template('articles.html', feed=feed, nb_articles=nb_articles)
bgstack15