mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
FIX: Allow a search for a parent slug when a child exists with the same
name.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user