Handling cases of no original story when saving/sharing story from ifttt.

This commit is contained in:
Samuel Clay 2014-03-17 17:21:06 -07:00
parent d1733cda21
commit 4f0794436f

View file

@ -632,6 +632,7 @@ def api_share_new_story(request):
if not story_content or not story_title:
ti = TextImporter(feed=original_feed, story_url=story_url, request=request)
original_story = ti.fetch(return_document=True)
if original_story:
story_url = original_story['url']
if not story_content:
story_content = original_story['content']
@ -704,6 +705,7 @@ def api_save_new_story(request):
if not story_content or not story_title:
ti = TextImporter(feed=original_feed, story_url=story_url, request=request)
original_story = ti.fetch(return_document=True)
if original_story:
story_url = original_story['url']
if not story_content:
story_content = original_story['content']