mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: case-insensitive category lookup when creating topics
This commit is contained in:
@ -73,7 +73,7 @@ class TopicCreator
|
||||
if (@opts[:category].is_a? Integer) || (@opts[:category] =~ /^\d+$/)
|
||||
Category.find_by(id: @opts[:category])
|
||||
else
|
||||
Category.find_by(name: @opts[:category])
|
||||
Category.find_by(name_lower: @opts[:category].try(:downcase))
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user