mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 16:35:32 +08:00
DEV: Let create!
handle the check for persistence.
This is unlikely to fail but we want to know when it does.
This commit is contained in:
parent
6797a710aa
commit
86926f4aee
@ -220,8 +220,7 @@ class InvitesController < ApplicationController
|
||||
end
|
||||
|
||||
def send_activation_email(user)
|
||||
email_token = user.email_tokens.create(email: user.email)
|
||||
raise ActiveRecord::RecordInvalid.new(email_token) if !email_token.persisted?
|
||||
email_token = user.email_tokens.create!(email: user.email)
|
||||
|
||||
Jobs.enqueue(:critical_user_email,
|
||||
type: :signup,
|
||||
|
Loading…
x
Reference in New Issue
Block a user