summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-02-13 14:52:49 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-02-13 15:17:27 +0100
commitcb295ba5bd0809630bda6c81fc2016744e9bd63f (patch)
tree444ddbf94f26c0f09bdcaa23b6138bcf849ce947
parent532a966410ad00264376bfd071c87193b97a289b (diff)
downloadgitlab-ce-cb295ba5bd0809630bda6c81fc2016744e9bd63f.tar.gz
Validate project variables by scope
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 3893b1818f3..2ba6a863500 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -261,7 +261,7 @@ class Project < ActiveRecord::Base
validates :repository_storage,
presence: true,
inclusion: { in: ->(_object) { Gitlab.config.repositories.storages.keys } }
- validates :variables, variable_duplicates: true
+ validates :variables, variable_duplicates: { scope: :environment_scope }
has_many :uploads, as: :model, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent