Now that we're counting unread stories differently, make sure to not include old stories that are behind the mark_read date for the user.

This commit is contained in:
Samuel Clay 2010-09-19 11:48:38 -04:00
parent 82163735e5
commit 4119266e56

View file

@ -92,6 +92,8 @@ class UserSubscription(models.Model):
logging.info(' ---> [%s] MStory: %s' % (self.user, datetime.datetime.now() - now))
unread_stories_db = []
for story in stories_db:
if story.story_date < date_delta:
continue
if hasattr(story, 'story_guid') and story.story_guid not in read_stories_ids:
unread_stories_db.append(story)
elif isinstance(story.id, unicode) and story.id not in read_stories_ids: