mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user