diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-06 16:00:39 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-06 16:00:39 +0900 |
commit | c1f064cbe39d6008206a0fe31e10f4a5e0c9ad28 (patch) | |
tree | 5a6d6bdd1a502a817125aa98854dc65c31e20808 | |
parent | 1d5f2f9c333534b7004501bcfa52ca873d6a3403 (diff) | |
download | gitlab-ce-c1f064cbe39d6008206a0fe31e10f4a5e0c9ad28.tar.gz |
Remove unique validation from external_url in Environmentfix/sm/37299-environments-validate-uniqueness-on-url-and-can-cause-silent-deployment-failures
-rw-r--r-- | app/models/environment.rb | 1 | ||||
-rw-r--r-- | spec/models/environment_spec.rb | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 8d6b0a32c13..21a028e351c 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -30,7 +30,6 @@ class Environment < ActiveRecord::Base message: Gitlab::Regex.environment_slug_regex_message } validates :external_url, - uniqueness: { scope: :project_id }, length: { maximum: 255 }, allow_nil: true, addressable_url: true diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index f75de0a0d88..1ce1d595c60 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -18,7 +18,6 @@ describe Environment do it { is_expected.to validate_length_of(:slug).is_at_most(24) } it { is_expected.to validate_length_of(:external_url).is_at_most(255) } - it { is_expected.to validate_uniqueness_of(:external_url).scoped_to(:project_id) } describe '.order_by_last_deployed_at' do let(:project) { create(:project, :repository) } |