From 2fa204b8401b200b6f68b484a25e04890edae830 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Thu, 13 Mar 2014 16:13:53 -0700 Subject: [PATCH] Attempting a fix to broken de-duping when a story guid that a story is going to be merged into already exists further out. --- apps/rss_feeds/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/rss_feeds/models.py b/apps/rss_feeds/models.py index 4b6855044..cfd1eb290 100644 --- a/apps/rss_feeds/models.py +++ b/apps/rss_feeds/models.py @@ -1311,7 +1311,10 @@ class Feed(models.Model): continue elif story.get('guid') == existing_story.story_guid: story_in_system = existing_story - + elif (existing_story.story_guid in new_story_guids and + story.get('guid') != existing_story.story_guid): + # Story coming up later + continue # Title distance + content distance, checking if story changed story_title_difference = abs(levenshtein_distance(story.get('title'), existing_story.story_title))