# HG changeset patch # User dirk # Date 1333424113 -7200 # Node ID 4cb22b47b659d217556f69aebbdad315b87b3503 # Parent 173fd7b9198f4a98733fb5ad4bef96813ecd50ad Due to a bug in CouchDB it's possible that a view still references deleted documents. Detect this case and don't add NoneType objects into the list of feeds. diff -r 173fd7b9198f -r 4cb22b47b659 backend/couchdb/CouchDbBackend.py --- a/backend/couchdb/CouchDbBackend.py Tue Apr 03 04:54:06 2012 +0200 +++ b/backend/couchdb/CouchDbBackend.py Tue Apr 03 05:35:13 2012 +0200 @@ -48,7 +48,10 @@ feedsWithUnreadEntries = [] for row in viewResults: feed = Feed.load(self.database, row["key"]) - feedsWithUnreadEntries.append(feed) + # see https://issues.apache.org/jira/browse/COUCHDB-1279 + # it's possible that the view references documents that have already been deleted + if feed is not None: + feedsWithUnreadEntries.append(feed) return feedsWithUnreadEntries def _retrieveEntriesForSelectedFeed(self, hideReadEntries):