mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-24 05:42:03 -04:00
FIX: Allow a search for a parent slug when a child exists with the same
name.
This commit is contained in:
parent
7ed969f0c7
commit
22de2edae7
1 changed files with 1 additions and 1 deletions
|
@ -309,7 +309,7 @@ SQL
|
|||
end
|
||||
|
||||
def self.query_parent_category(parent_slug)
|
||||
self.where(slug: parent_slug).pluck(:id).first ||
|
||||
self.where(slug: parent_slug, parent_category_id: nil).pluck(:id).first ||
|
||||
self.where(id: parent_slug.to_i).pluck(:id).first
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue