mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 03:33:58 -06:00
FIX: query for tag with no sub-categories
This commit is contained in:
parent
82e170d6a6
commit
1f12e41029
@ -53,7 +53,12 @@ class TagsController < ::ApplicationController
|
||||
results = query.send("#{filter}_results")
|
||||
|
||||
if @filter_on_category
|
||||
category_ids = [@filter_on_category.id] + @filter_on_category.subcategories.pluck(:id)
|
||||
category_ids = [@filter_on_category.id]
|
||||
|
||||
unless list_opts[:no_subcategories]
|
||||
category_ids += @filter_on_category.subcategories.pluck(:id)
|
||||
end
|
||||
|
||||
results = results.where(category_id: category_ids)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user