summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-09-18 00:07:10 +0000
committerNick Thomas <nick@gitlab.com>2018-09-18 00:07:10 +0000
commit953018e3d4b0bc101543218f4cdf235e1a9d51c8 (patch)
treed50de75c7181eb1e3b99240ddb177d12f5862c75
parent4b33b17bf168de6819538fee69020ac9aeba9498 (diff)
parent6cdb45531486c8b3dd997cc97549f84b11e8954e (diff)
downloadgitlab-ce-953018e3d4b0bc101543218f4cdf235e1a9d51c8.tar.gz
Merge branch 'sh-fix-commit-email-migration' into 'master'
Return a default commit email if migration has not completed Closes #51530 See merge request gitlab-org/gitlab-ce!21790
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 277218d8949..7ca456031a0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -633,7 +633,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