From f9eab468cf9c03a0e9795a67188912629f155acb Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Fri, 17 May 2013 14:01:30 -0700 Subject: [PATCH] Slight improvement to unread story hashes endpoint by skipping feeds with no neutral/positive unreads. --- apps/reader/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/reader/views.py b/apps/reader/views.py index 12d7212d4..779d2b687 100644 --- a/apps/reader/views.py +++ b/apps/reader/views.py @@ -840,6 +840,8 @@ def unread_story_hashes(request): us = UserSubscription.objects.get(user=user.pk, feed=feed_id) except UserSubscription.DoesNotExist: continue + if not us.unread_count_neutral and not us.unread_count_positive: + continue unread_feed_story_hashes[feed_id] = us.get_stories(read_filter='unread', limit=500, hashes_only=True) story_hash_count += len(unread_feed_story_hashes[feed_id])