aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/mongodb.py2
-rwxr-xr-xsource/pyAggr3g470r.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/source/mongodb.py b/source/mongodb.py
index 38081780..f0aa730a 100644
--- a/source/mongodb.py
+++ b/source/mongodb.py
@@ -134,7 +134,7 @@ class Articles(object):
try:
return next(collection.find({"article_id":article_id}))
except:
- return False
+ return []
def get_favorites(self, feed_id=None):
"""
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 1c2009fe..b12039d4 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -199,9 +199,11 @@ class pyAggr3g470r(object):
"""
try:
feed_id, article_id = param.split(':')
+ article = self.mongo.get_articles(feed_id, article_id)
+ if article == []:
+ return self.error("<p>This article do not exists.</p>")
feed = self.mongo.get_feed(feed_id)
articles = self.mongo.get_articles(feed_id)
- article = self.mongo.get_articles(feed_id, article_id)
except:
return self.error("<p>Bad URL. This article do not exists.</p>")
bgstack15