Keeping read_status consistent as an integer, not a boolean.

This commit is contained in:
Samuel Clay 2013-05-10 13:50:38 -07:00
parent 6881553809
commit b44b126b41
2 changed files with 2 additions and 2 deletions

View file

@ -556,7 +556,7 @@ def load_single_feed(request, feed_id):
if read_filter == 'unread' and usersub:
story['read_status'] = 0
elif read_filter == 'all' and usersub:
story['read_status'] = story['story_hash'] not in unread_story_hashes
story['read_status'] = 1 if story['story_hash'] not in unread_story_hashes else 0
if story['story_hash'] in starred_stories:
story['starred'] = True
starred_date = localtime_for_timezone(starred_stories[story['story_hash']],

View file

@ -124,7 +124,7 @@ def load_social_stories(request, user_id, username=None):
if read_filter == 'unread' and socialsub:
story['read_status'] = 0
elif read_filter == 'all' and socialsub:
story['read_status'] = story['story_hash'] not in unread_story_hashes
story['read_status'] = 1 if story['story_hash'] not in unread_story_hashes else 0
if story['story_hash'] in starred_stories:
story['starred'] = True