aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource/pyAggr3g470r.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 297c05a1..1c2009fe 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -269,6 +269,8 @@ class pyAggr3g470r(object):
"""
try:
feed = self.mongo.get_feed(feed_id)
+ if feed == None:
+ return self.error("<p>This feed do not exists.</p>")
articles = self.mongo.get_articles(feed_id, limit=10)
nb_articles_feed = self.mongo.nb_articles(feed_id)
nb_articles_total = self.mongo.nb_articles()
@@ -277,8 +279,7 @@ class pyAggr3g470r(object):
nb_favorites = self.mongo.nb_favorites(feed_id)
except KeyError:
return self.error("<p>This feed do not exists.</p>")
- if feed == None:
- return self.error("<p>This feed do not exists.</p>")
+
if articles.count() != 0:
today = datetime.datetime.now()
bgstack15