Handling dupe stories

This commit is contained in:
Samuel Clay 2016-10-06 18:09:46 -07:00
parent 7e6aad7b6d
commit 6a53d127d9

View file

@ -1497,6 +1497,10 @@ class Feed(models.Model):
}
authors = feed['authors'][story['story_authors']]
authors['count'] += 1
for seen_story in authors['stories']:
if seen_story['url'] == story['story_permalink']:
break
else:
authors['stories'].append({
'title': story['story_title'],
'url': story['story_permalink'],