mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
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.
This commit is contained in:
parent
99240476cb
commit
b7490e894f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user