summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-11-14 12:38:25 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-11-14 12:39:08 -0300
commit2b4deed9eab68e03b21a0c71f2d0ea82f66a62cd (patch)
tree1772ccce2eb67feaf44bc90d7a796943918d6901
parent7f151a7898bf6b836ba7ae0b53d718a1263b5d6f (diff)
downloadgitlab-ce-2b4deed9eab68e03b21a0c71f2d0ea82f66a62cd.tar.gz
Use `default_value_for` to handle null values in only_allow_merge_if_all_discussions_are_resolvedfix-migration-changes
-rw-r--r--app/models/project.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 94aabafce20..bab2f0c53ca 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -35,6 +35,7 @@ class Project < ActiveRecord::Base
default_value_for :builds_enabled, gitlab_config_features.builds
default_value_for :wiki_enabled, gitlab_config_features.wiki
default_value_for :snippets_enabled, gitlab_config_features.snippets
+ default_value_for :only_allow_merge_if_all_discussions_are_resolved, false
after_create :ensure_dir_exist
after_create :create_project_feature, unless: :project_feature
@@ -1334,10 +1335,6 @@ class Project < ActiveRecord::Base
end
end
- def only_allow_merge_if_all_discussions_are_resolved
- super || false
- end
-
private
def pushes_since_gc_redis_key