diff options
author | Matija Čupić <matija@gitlab.com> | 2018-02-14 23:09:18 +0000 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-22 23:09:10 +0100 |
commit | 44fed816ee510c0aa56406c9221a0ffb2601d8f5 (patch) | |
tree | 0768a343f2fcd3e12aefcf330c78824121072ee9 | |
parent | e037854adac8f9bf5bc17dd80f94511348d73155 (diff) | |
download | gitlab-ce-44fed816ee510c0aa56406c9221a0ffb2601d8f5.tar.gz |
Do not validate individual Variables when saving Project/Group
-rw-r--r-- | app/models/group.rb | 2 | ||||
-rw-r--r-- | app/models/project.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 75bf013ecd2..45160875dfb 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -26,7 +26,7 @@ class Group < Namespace has_many :shared_projects, through: :project_group_links, source: :project has_many :notification_settings, dependent: :destroy, as: :source # rubocop:disable Cop/ActiveRecordDependent has_many :labels, class_name: 'GroupLabel' - has_many :variables, class_name: 'Ci::GroupVariable' + has_many :variables, class_name: 'Ci::GroupVariable', validate: false has_many :custom_attributes, class_name: 'GroupCustomAttribute' has_many :uploads, as: :model, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent diff --git a/app/models/project.rb b/app/models/project.rb index 4ad6f025e5c..fd09bb6a4d3 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -210,7 +210,7 @@ class Project < ActiveRecord::Base has_many :build_trace_section_names, class_name: 'Ci::BuildTraceSectionName' has_many :runner_projects, class_name: 'Ci::RunnerProject' has_many :runners, through: :runner_projects, source: :runner, class_name: 'Ci::Runner' - has_many :variables, class_name: 'Ci::Variable' + has_many :variables, class_name: 'Ci::Variable', validate: false has_many :triggers, class_name: 'Ci::Trigger' has_many :environments has_many :deployments |