Fixing a common error for feeds: too many feed authors causing an error. Now correctly reducing the author list to an acceptable amount.

This commit is contained in:
Samuel Clay 2010-08-25 21:55:22 -04:00
parent cf8cfaba75
commit 077fdea638

View file

@ -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