##// END OF EJS Templates
Don't load all posts when only last are required
neko259 -
r1530:2c63bb5d default
parent child Browse files
Show More
@@ -184,7 +184,7 b' class Thread(models.Model):'
184 'images', 'thread', 'threads', 'attachments')
184 'images', 'thread', 'threads', 'attachments')
185 if view_fields_only:
185 if view_fields_only:
186 query = query.defer('poster_ip')
186 query = query.defer('poster_ip')
187 return query.all()
187 return query
188
188
189 def get_top_level_replies(self) -> QuerySet:
189 def get_top_level_replies(self) -> QuerySet:
190 return self.get_replies().exclude(refposts__threads__in=[self])
190 return self.get_replies().exclude(refposts__threads__in=[self])
General Comments 0
You need to be logged in to leave comments. Login now