mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Handling cases of no original story when saving/sharing story from ifttt.
This commit is contained in:
parent
d1733cda21
commit
4f0794436f
1 changed files with 12 additions and 10 deletions
|
@ -632,11 +632,12 @@ 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)
|
||||
story_url = original_story['url']
|
||||
if not story_content:
|
||||
story_content = original_story['content']
|
||||
if not story_title:
|
||||
story_title = original_story['title']
|
||||
if original_story:
|
||||
story_url = original_story['url']
|
||||
if not story_content:
|
||||
story_content = original_story['content']
|
||||
if not story_title:
|
||||
story_title = original_story['title']
|
||||
|
||||
story_content = lxml.html.fromstring(story_content)
|
||||
story_content.make_links_absolute(story_url)
|
||||
|
@ -704,11 +705,12 @@ 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)
|
||||
story_url = original_story['url']
|
||||
if not story_content:
|
||||
story_content = original_story['content']
|
||||
if not story_title:
|
||||
story_title = original_story['title']
|
||||
if original_story:
|
||||
story_url = original_story['url']
|
||||
if not story_content:
|
||||
story_content = original_story['content']
|
||||
if not story_title:
|
||||
story_title = original_story['title']
|
||||
try:
|
||||
story_db = {
|
||||
"user_id": user.pk,
|
||||
|
|
Loading…
Add table
Reference in a new issue