mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing errors on existing story search in feed fetching. Turns out it was using the wrong story_date to quickly determine if the story is new or not.
This commit is contained in:
parent
6260df43e9
commit
a75417d917
1 changed files with 3 additions and 1 deletions
|
@ -508,12 +508,14 @@ class Feed(models.Model):
|
|||
story_published_now = story.get('published_now', False)
|
||||
start_date = story_pub_date - datetime.timedelta(hours=8)
|
||||
end_date = story_pub_date + datetime.timedelta(hours=8)
|
||||
existing_stories.rewind()
|
||||
|
||||
for existing_story in existing_stories:
|
||||
content_ratio = 0
|
||||
existing_story_pub_date = existing_story['story_date']
|
||||
# print 'Story pub date: %s %s' % (story_published_now, story_pub_date)
|
||||
if (story_published_now or
|
||||
(story_pub_date > start_date and story_pub_date < end_date)):
|
||||
(existing_story_pub_date > start_date and existing_story_pub_date < end_date)):
|
||||
if isinstance(existing_story['_id'], unicode):
|
||||
existing_story['story_guid'] = existing_story['_id']
|
||||
if story.get('guid') and story.get('guid') == existing_story['story_guid']:
|
||||
|
|
Loading…
Add table
Reference in a new issue