mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: query for tag with no sub-categories
This commit is contained in:
parent
82e170d6a6
commit
1f12e41029
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue