change validation again

This commit is contained in:
mlorb 2018-03-05 13:12:44 +01:00 committed by GitHub
parent d19ca7fbdc
commit a19b672a83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -182,7 +182,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
# Create new team for the new user
@team = Team.new(team_provider_params)
if @team.valid? && @user.present? && Rails.configuration.x.new_team_on_signup
if @team.valid? && @user && Rails.configuration.x.new_team_on_signup
# Set the confirmed_at == created_at IF not using email confirmations
unless Rails.configuration.x.enable_email_confirmations
@user.update!(confirmed_at: @user.created_at)