# HG changeset patch # User neko259 # Date 2016-05-08 17:22:03 # Node ID 2c63bb5debae66ae17923c1365a06bd0a05dc83b # Parent edc4abb6bab2deb46b0d1f918ad9194c4f7df969 Don't load all posts when only last are required diff --git a/boards/models/thread.py b/boards/models/thread.py --- a/boards/models/thread.py +++ b/boards/models/thread.py @@ -184,7 +184,7 @@ class Thread(models.Model): 'images', 'thread', 'threads', 'attachments') if view_fields_only: query = query.defer('poster_ip') - return query.all() + return query def get_top_level_replies(self) -> QuerySet: return self.get_replies().exclude(refposts__threads__in=[self])