eager load more tables for the topic_view
This commit is contained in:
parent
c26ba890bd
commit
c76161787c
|
@ -387,7 +387,7 @@ class TopicView
|
|||
def filter_posts_by_ids(post_ids)
|
||||
# TODO: Sort might be off
|
||||
@posts = Post.where(id: post_ids, topic_id: @topic.id)
|
||||
.includes(:user, :reply_to_user, :incoming_email)
|
||||
.includes({ user: :primary_group }, :reply_to_user, :deleted_by, :incoming_email, :topic)
|
||||
.order('sort_order')
|
||||
@posts = filter_post_types(@posts)
|
||||
@posts = @posts.with_deleted if @guardian.can_see_deleted_posts?
|
||||
|
|
Loading…
Reference in New Issue