From e37ea4a4a13d4c7117b8a5da7900cae78b84d388 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 15 May 2020 09:14:14 +0800 Subject: [PATCH] Revert "FIX: don't compute draft for bots on categories index route" This reverts commit 1b7f23a1bc79e323a93cdcc06bbdc499a128a72b. --- app/controllers/categories_controller.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 4520670bc6..770275a65e 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -31,13 +31,11 @@ class CategoriesController < ApplicationController @category_list = CategoryList.new(guardian, category_options) @category_list.draft_key = Draft::NEW_TOPIC - 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 + @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 category_options[:is_homepage] && SiteSetting.short_site_description.present? @title = "#{SiteSetting.title} - #{SiteSetting.short_site_description}"