mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08: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
|
@ -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…
Reference in New Issue
Block a user