aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 02495311..668ec141 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -249,6 +249,8 @@ def articles(feed_id=None, nb_articles=-1):
user = models.User.objects(email=g.user.email, feeds__oid=feed_id).first()
for feed in user.feeds:
if str(feed.oid) == feed_id:
+ if len(feed.articles) <= nb_articles:
+ nb_articles = -1
if nb_articles != -1:
feed.articles = feed.articles[0:nb_articles]
return render_template('articles.html', feed=feed, nb_articles=nb_articles)
bgstack15