summaryrefslogtreecommitdiff
path: root/app/models/remote_mirror.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-11-28 03:24:50 -0800
committerStan Hu <stanhu@gmail.com>2018-11-28 11:23:27 -0800
commit207f0a1b16a886aec0af57805264f64ff9d21b19 (patch)
treebb9b3f7185ca5e173dbc5471cc8798f746848943 /app/models/remote_mirror.rb
parent75eb04161f218b40434c2175223c661a4127297e (diff)
downloadgitlab-ce-207f0a1b16a886aec0af57805264f64ff9d21b19.tar.gz
Make RemoteMirror's only_protected_branches default value consistent
From https://gitlab.com/gitlab-org/gitlab-ce/issues/53515, we see the backend appears to have inconsistent default values for this column: * DB schema: false by default * UI checkbox: false by default * `RemoteMirror` model: true by default This leads to unintended behavior where the boolean is activated if the UI doesn't pass in a value for the checkbox.
Diffstat (limited to 'app/models/remote_mirror.rb')
-rw-r--r--app/models/remote_mirror.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb
index a3415a4a14c..b7b4d0f1be9 100644
--- a/app/models/remote_mirror.rb
+++ b/app/models/remote_mirror.rb
@@ -15,8 +15,6 @@ class RemoteMirror < ActiveRecord::Base
insecure_mode: true,
algorithm: 'aes-256-cbc'
- default_value_for :only_protected_branches, true
-
belongs_to :project, inverse_of: :remote_mirrors
validates :url, presence: true, url: { protocols: %w(ssh git http https), allow_blank: true, enforce_user: true }