mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Merging feeds, handling null story_guids
This commit is contained in:
parent
20a2420542
commit
613ace35bb
1 changed files with 3 additions and 3 deletions
|
@ -879,9 +879,9 @@ def merge_feeds(original_feed_id, duplicate_feed_id):
|
|||
for user_story in user_stories:
|
||||
user_story.feed_id = original_feed.pk
|
||||
duplicate_story = user_story.story
|
||||
story_guid = hasattr(duplicate_story, 'story_guid') or duplicate_story.id
|
||||
original_story = MStory.objects(story_guid=story_guid,
|
||||
story_feed_id=original_feed.pk)
|
||||
story_guid = duplicate_story.story_guid if hasattr(duplicate_story, 'story_guid') else duplicate_story.id
|
||||
original_story = MStory.objects(story_feed_id=original_feed.pk,
|
||||
story_guid=story_guid)
|
||||
|
||||
if original_story:
|
||||
user_story.story = original_story[0]
|
||||
|
|
Loading…
Add table
Reference in a new issue