Still showing publisher greens if story has no feed_id and therefore wont have any feed greens.

This commit is contained in:
Samuel Clay 2012-12-10 14:19:54 -08:00
parent 0ad6368a45
commit 0afd1d4326

View file

@ -136,8 +136,10 @@ def apply_classifier_tags(classifiers, story):
return score
def apply_classifier_feeds(classifiers, feed, social_user_ids=None):
if not feed: return 0
feed_id = feed if isinstance(feed, int) else feed.pk
if not feed and not social_user_ids: return 0
feed_id = None
if feed:
feed_id = feed if isinstance(feed, int) else feed.pk
if social_user_ids and not isinstance(social_user_ids, list):
social_user_ids = [social_user_ids]