diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-21 12:19:05 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-21 12:21:08 +0100 |
commit | ee7e4fd34196003d8f3899704e5c537d965b7a9a (patch) | |
tree | 9e2270f75a998aca520af1869b5d4dfaa4d0a02c | |
parent | 1fdd1fa6ae7bd1bda3235bfa8685463fb5597646 (diff) | |
download | gitlab-ci-ee7e4fd34196003d8f3899704e5c537d965b7a9a.tar.gz |
Fix problem with variables saving
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/models/variable.rb | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -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 |