mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
DEV: Don't eager load tags when tagging is not enabled.
This commit is contained in:
parent
14a0247301
commit
7719453fb7
1 changed files with 2 additions and 1 deletions
|
@ -586,7 +586,8 @@ class TopicQuery
|
||||||
options = @options
|
options = @options
|
||||||
options.reverse_merge!(per_page: per_page_setting)
|
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
|
if type == :group
|
||||||
result = result.joins(
|
result = result.joins(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue