Handling unread story marking where story cna't be found.

This commit is contained in:
Samuel Clay 2013-07-01 11:50:30 -07:00
parent 3b7b5d1275
commit 506c2cdf99
2 changed files with 10 additions and 0 deletions

View file

@ -1095,6 +1095,10 @@ def mark_story_as_unread(request):
story, found_original = MStory.find_story(feed_id, story_id)
if not story:
logging.user(request, "~FY~SBUnread~SN story in feed: %s (NOT FOUND)" % (feed))
return dict(code=-1, message="Story not found.")
if usersub and story.story_date < usersub.mark_read_date:
# Story is outside the mark as read range, so invert all stories before.
newer_stories = MStory.objects(story_feed_id=story.story_feed_id,

6
fabfile.py vendored
View file

@ -252,6 +252,12 @@ def setup_task(queue=None, skip_common=False):
config_monit_task()
done()
def setup_task_image():
copy_task_settings()
setup_hosts()
config_pgbouncer()
deploy()
# ==================
# = Setup - Common =
# ==================