mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 18:58:10 +00:00
FIX: allow invite email field to be blank for invite tokens
This commit is contained in:
parent
8ab39f6916
commit
435fe8ac6e
@ -18,7 +18,7 @@ class Invite < ActiveRecord::Base
|
||||
has_many :topic_invites
|
||||
has_many :topics, through: :topic_invites, source: :topic
|
||||
validates_presence_of :invited_by_id
|
||||
validates :email, email: true, format: { with: EmailValidator.email_regex }
|
||||
validates :email, email: true, format: { with: EmailValidator.email_regex }, allow_blank: true
|
||||
|
||||
before_create do
|
||||
self.invite_key ||= SecureRandom.hex
|
||||
|
Loading…
x
Reference in New Issue
Block a user