Read about our upcoming Code of Conduct on this issue

Commit cd2dfbe6 authored by Matija Čupić's avatar Matija Čupić Committed by Matija Čupić
Browse files

Do not validate individual Variables when saving Project/Group

parent a1bd5ef3e55b
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment