Story_guids can be unicode IDs.

This commit is contained in:
Samuel Clay 2010-09-10 01:27:41 -07:00
parent 4c268384be
commit 29605c7c9e

View file

@ -517,7 +517,12 @@ class Feed(models.Model):
# Title distance + content distance, checking if story changed
story_title_difference = levenshtein_distance(story.get('title'),
existing_story['story_title'])
existing_story_content = zlib.decompress(existing_story['story_content_z'])
if 'story_content_z' in existing_story:
existing_story_content = zlib.decompress(existing_story['story_content_z'])
elif 'story_content' in existing_story:
existing_story_content = existing_story['story_content']
else:
existing_story_content = ''
seq = difflib.SequenceMatcher(None, story_content, existing_story_content)
if (seq