mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: show proper error message when no user selected for private message
This commit is contained in:
parent
24a49daa71
commit
53809d526c
3 changed files with 4 additions and 5 deletions
|
@ -317,8 +317,7 @@ class PostCreator
|
|||
topic_creator = TopicCreator.new(@user, guardian, @opts)
|
||||
@topic = topic_creator.create
|
||||
rescue ActiveRecord::Rollback
|
||||
add_errors_from(topic_creator)
|
||||
return
|
||||
rollback_from_errors!(topic_creator)
|
||||
end
|
||||
@post.topic_id = @topic.id
|
||||
@post.topic = @topic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue