Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/analytics/devops_adoption/segment.rb')
-rw-r--r--app/models/analytics/devops_adoption/segment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/analytics/devops_adoption/segment.rb b/app/models/analytics/devops_adoption/segment.rb
index 71d4a312627..baab5b94126 100644
--- a/app/models/analytics/devops_adoption/segment.rb
+++ b/app/models/analytics/devops_adoption/segment.rb
@@ -7,7 +7,7 @@ class Analytics::DevopsAdoption::Segment < ApplicationRecord
has_many :groups, through: :segment_selections
validates :name, presence: true, uniqueness: true, length: { maximum: 255 }
- validate :validate_segment_count
+ validate :validate_segment_count, on: :create
accepts_nested_attributes_for :segment_selections, allow_destroy: true