FIX: don't compute draft for bots on categories index route
This commit is contained in:
parent
e0e967ac46
commit
1b7f23a1bc
|
@ -31,11 +31,13 @@ class CategoriesController < ApplicationController
|
|||
|
||||
@category_list = CategoryList.new(guardian, category_options)
|
||||
@category_list.draft_key = Draft::NEW_TOPIC
|
||||
@category_list.draft_sequence = DraftSequence.current(
|
||||
current_user,
|
||||
Draft::NEW_TOPIC
|
||||
)
|
||||
@category_list.draft = Draft.get(current_user, Draft::NEW_TOPIC, @category_list.draft_sequence) if current_user
|
||||
if current_user&.human?
|
||||
@category_list.draft_sequence = DraftSequence.current(
|
||||
current_user,
|
||||
Draft::NEW_TOPIC
|
||||
)
|
||||
@category_list.draft = Draft.get(current_user, Draft::NEW_TOPIC, @category_list.draft_sequence)
|
||||
end
|
||||
|
||||
if category_options[:is_homepage] && SiteSetting.short_site_description.present?
|
||||
@title = "#{SiteSetting.title} - #{SiteSetting.short_site_description}"
|
||||
|
|
Loading…
Reference in New Issue