summaryrefslogtreecommitdiff
path: root/app/models/ci/variable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/variable.rb')
-rw-r--r--app/models/ci/variable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb
index 96d6e120998..0b8d0ff881a 100644
--- a/app/models/ci/variable.rb
+++ b/app/models/ci/variable.rb
@@ -5,7 +5,7 @@ module Ci
belongs_to :project
- validates :key, uniqueness: { scope: :project_id }
+ validates :key, uniqueness: { scope: [:project_id, :environment_scope] }
scope :unprotected, -> { where(protected: false) }
end