mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 14:54:33 +08:00
PERF: Don't join on shared drafts unless you have to
This commit is contained in:
@ -71,7 +71,10 @@ class ListController < ApplicationController
|
||||
|
||||
list = TopicQuery.new(user, list_opts).public_send("list_#{filter}")
|
||||
|
||||
if @category.present? && guardian.can_create_shared_draft?
|
||||
if @category.present? &&
|
||||
guardian.can_create_shared_draft? &&
|
||||
@category.id != SiteSetting.shared_drafts_category.to_i
|
||||
|
||||
shared_drafts = TopicQuery.new(
|
||||
user,
|
||||
category: SiteSetting.shared_drafts_category,
|
||||
|
Reference in New Issue
Block a user