diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-01-04 20:35:14 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-01-04 20:35:14 +0300 |
commit | c85c0ccc8d69f2549950588e336cb748f007bd36 (patch) | |
tree | 065cb58c85b080cefe79364166aa6ce2e48f05fc /app/models/user.rb | |
parent | 335f02a511f41331ab92b01e2610b1de5fa30470 (diff) | |
parent | 75cf5f5b548c6e6df47eff721a31cd70fe202451 (diff) |
Merge branch 'mdelaossa/gitlab-ce-31995-project-limit-default-fix'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 9d99a3f0c67..4484ee9ff4c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -794,10 +794,7 @@ class User < ActiveRecord::Base # `User.select(:id)` raises # `ActiveModel::MissingAttributeError: missing attribute: projects_limit` # without this safeguard! - return unless has_attribute?(:projects_limit) - - connection_default_value_defined = new_record? && !projects_limit_changed? - return unless projects_limit.nil? || connection_default_value_defined + return unless has_attribute?(:projects_limit) && projects_limit.nil? self.projects_limit = current_application_settings.default_projects_limit end |