diff options
author | Alexander Randa <aranda@rocketfuel.com> | 2017-03-24 11:32:03 +0000 |
---|---|---|
committer | Alexander Randa <aranda@rocketfuel.com> | 2017-03-24 11:32:03 +0000 |
commit | 7a1236031aabd900facdbe7bd4940e03175d477b (patch) | |
tree | 930dbd18724ceb4e5d73a5d58c47acf30c0271db /app/models/user.rb | |
parent | f74e9245cb18582caa79abd4b7c0b942b9dae851 (diff) | |
download | gitlab-ce-7a1236031aabd900facdbe7bd4940e03175d477b.tar.gz |
Fix projects_limit RangeError on user create
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 5d19d873f43..1c2821bb91a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -115,7 +115,9 @@ class User < ActiveRecord::Base validates :notification_email, email: true, if: ->(user) { user.notification_email != user.email } validates :public_email, presence: true, uniqueness: true, email: true, allow_blank: true validates :bio, length: { maximum: 255 }, allow_blank: true - validates :projects_limit, presence: true, numericality: { greater_than_or_equal_to: 0 } + validates :projects_limit, + presence: true, + numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: Gitlab::Database::MAX_INT_VALUE } validates :username, namespace: true, presence: true, |