Speeding up unread story counts.

This commit is contained in:
Samuel Clay 2013-05-03 17:28:05 -07:00
parent b9f6626358
commit d03a9c30a7

View file

@ -386,8 +386,7 @@ class UserSubscription(models.Model):
unread_story_hashes = self.get_stories(read_filter='unread', limit=500, fetch_stories=False)
if not stories:
stories_db = MStory.objects(story_feed_id=self.feed_id,
story_hash__in=unread_story_hashes)
stories_db = MStory.objects(story_hash__in=unread_story_hashes)
stories = Feed.format_stories(stories_db, self.feed_id)
oldest_unread_story_date = now