2
0
Fork 0
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:
Arpit Jalan 2016-05-05 18:28:25 +05:30
parent 24a49daa71
commit 53809d526c
3 changed files with 4 additions and 5 deletions

View file

@ -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