From 077fdea638270d25e8b1ab7d4257de0290263459 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Wed, 25 Aug 2010 21:55:22 -0400 Subject: [PATCH] Fixing a common error for feeds: too many feed authors causing an error. Now correctly reducing the author list to an acceptable amount. --- apps/rss_feeds/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/rss_feeds/models.py b/apps/rss_feeds/models.py index 27ee9250d..1957a7ab4 100644 --- a/apps/rss_feeds/models.py +++ b/apps/rss_feeds/models.py @@ -396,9 +396,8 @@ class Feed(models.Model): self.save(lock=lock) return - authors_list = json.decode(feed_authors) if feed_authors else [] - if len(authors_list) > 1: - self.save_popular_authors(authors_list[:-1]) + if len(feed_authors) > 1: + self.save_popular_authors(feed_authors=feed_authors[:-1], lock=lock) def trim_feed(self): from apps.reader.models import UserStory