summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--app/models/variable.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index f2c33fa..3d3b2ef 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,7 @@ v7.14.0 (unreleased)
- Rename type(s) to stage(s)
- Add missing stage when doing retry
- Require variable keys to be not-empty and unique
+ - Fix variable saving issue
v7.13.1
- Fix: user could steal specific runner
diff --git a/app/models/variable.rb b/app/models/variable.rb
index 559b9f2..c084b89 100644
--- a/app/models/variable.rb
+++ b/app/models/variable.rb
@@ -15,7 +15,7 @@ class Variable < ActiveRecord::Base
belongs_to :project
validates_presence_of :key
- validates_uniqueness_of :key
+ validates_uniqueness_of :key, scope: :project_id
attr_encrypted :value, mode: :per_attribute_iv_and_salt, key: GitlabCi::Application.secrets.db_key_base
end