From b7490e894f7b48c2a5bf96476ab2b326ebac1aae Mon Sep 17 00:00:00 2001 From: Krzysztof Kotlarek Date: Mon, 30 Nov 2020 11:41:32 +1100 Subject: [PATCH] FIX: don't error-index category job when missing category When the category is missing we should not throw an error but just finish the job. --- app/jobs/regular/index_category_for_search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/regular/index_category_for_search.rb b/app/jobs/regular/index_category_for_search.rb index 396e95320f5..50e3970daaa 100644 --- a/app/jobs/regular/index_category_for_search.rb +++ b/app/jobs/regular/index_category_for_search.rb @@ -3,7 +3,7 @@ class Jobs::IndexCategoryForSearch < Jobs::Base def execute(args) category = Category.find_by(id: args[:category_id]) - raise Discourse::InvalidParameters.new(:category_id) if category.blank? + return if category.blank? SearchIndexer.index(category, force: args[:force] || false) end