This is seriously the most f'ed typo I've commited. It pulled in extra stories after the last few had loaded using the unread-only filter.

This commit is contained in:
Samuel Clay 2012-08-10 16:13:14 -07:00
parent 2a7af9d20e
commit 335ccfa504
2 changed files with 1 additions and 3 deletions

View file

@ -95,7 +95,7 @@ def feed_autocomplete(request):
'id': feed.pk,
'value': feed.feed_address,
'label': feed.feed_title,
'tagline': feed.data.feed_tagline,
'tagline': feed.data and feed.data.feed_tagline,
'num_subscribers': feed.num_subscribers,
} for feed in feeds]

View file

@ -53,8 +53,6 @@ def load_social_stories(request, user_id, username=None):
socialsub = MSocialSubscription.objects.get(user_id=user.pk, subscription_user_id=social_user_id)
except MSocialSubscription.DoesNotExist:
socialsub = None
mstories = MSharedStory.objects(user_id=social_user.pk).order_by('-shared_date')[offset:offset+limit]
stories = Feed.format_stories(mstories)
if socialsub and (read_filter == 'unread' or order == 'oldest'):
story_ids = socialsub.get_stories(order=order, read_filter=read_filter, offset=offset, limit=limit)