diff options
author | Stan Hu <stanhu@gmail.com> | 2018-09-15 21:39:02 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-09-15 21:39:02 -0700 |
commit | 6cdb45531486c8b3dd997cc97549f84b11e8954e (patch) | |
tree | 12ac99a3bf2385b2db79b88ef63d76b0c14bcfc3 /app/models/user.rb | |
parent | a30e266e438bc511b42af1ae7c05081ce115f29e (diff) | |
download | gitlab-ce-6cdb45531486c8b3dd997cc97549f84b11e8954e.tar.gz |
Return a default commit email if migration has not completed
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51530
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d68108a8e8e..7298f88e54c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -635,7 +635,7 @@ class User < ActiveRecord::Base # possibility of the commit_email column not existing. def commit_email - return unless has_attribute?(:commit_email) + return self.email unless has_attribute?(:commit_email) # The commit email is the same as the primary email if undefined super.presence || self.email |