DEV: Don't eager load tags when tagging is not enabled.

This commit is contained in:
Alan Guo Xiang Tan 2021-06-28 14:25:26 +08:00
parent 14a0247301
commit 7719453fb7
1 changed files with 2 additions and 1 deletions

View File

@ -586,7 +586,8 @@ class TopicQuery
options = @options
options.reverse_merge!(per_page: per_page_setting)
result = Topic.includes(:tags, :allowed_users)
result = Topic.includes(:allowed_users)
result = result.includes(:tags) if SiteSetting.tagging_enabled
if type == :group
result = result.joins(