mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
When creating a topic, don't select a category by default when allow_uncategorized_topics is false. Also, added category validation on the server to enforce allow_uncategorized_topics.
This commit is contained in:
@ -108,7 +108,7 @@ class TopicsController < ApplicationController
|
||||
success = false
|
||||
Topic.transaction do
|
||||
success = topic.save
|
||||
topic.change_category(params[:category]) if success
|
||||
success = topic.change_category(params[:category]) if success
|
||||
end
|
||||
|
||||
# this is used to return the title to the client as it may have been
|
||||
|
Reference in New Issue
Block a user