diff options
Diffstat (limited to 'source/mongodb.py')
-rw-r--r-- | source/mongodb.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/mongodb.py b/source/mongodb.py index 7879adee..93894154 100644 --- a/source/mongodb.py +++ b/source/mongodb.py @@ -131,7 +131,10 @@ class Articles(object): elif feed_id != None and article_id != None: # Return a precise article. collection = self.db[str(feed_id)] - return next(collection.find({"article_id":article_id})) + try: + return next(collection.find({"article_id":article_id})) + except: + return False def get_favorites(self, feed_id=None): """ |