mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 09:22:42 +08:00
DEV: Add debug lines for mystery no_user_selected error (#8759)
On some customer forums we are randomly getting a "You must select a valid user" error when sending a PM even when all parameters seem to be OK. This is an attempt to track it down with more data.
This commit is contained in:
@ -171,6 +171,8 @@ class TopicCreator
|
||||
topic.subtype = TopicSubtype.user_to_user unless topic.subtype
|
||||
|
||||
unless @opts[:target_usernames].present? || @opts[:target_emails].present? || @opts[:target_group_names].present?
|
||||
Rails.logger.debug("Topic PM cannot be created without recipients! opts: #{@opts.inspect}")
|
||||
|
||||
rollback_with!(topic, :no_user_selected)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user