rel #713, remove more queries from search results page
This commit is contained in:
parent
7e38d90ba0
commit
1d144ab6f1
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ def search(request, full=True):
|
|||
viewable_category = viewable_category.filter(Q(groups__in=user_groups) | Q(groups__isnull=True))
|
||||
|
||||
topics = Topic.objects.filter(forum__category__in=viewable_category) \
|
||||
.select_related('last_post', 'last_post__user')
|
||||
.select_related('last_post', 'last_post__user', 'user', 'forum')
|
||||
posts = Post.objects.filter(topic__forum__category__in=viewable_category)
|
||||
|
||||
base_url = None
|
||||
|
|
Reference in a new issue