diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 15:09:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 15:09:20 +0300 |
commit | b84eeb256c4a780d902faee1f99ca9a711b3214a (patch) | |
tree | 32918aadbea9210eace50efbce9afbfb8cd3ba84 /app/models | |
parent | 53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/analytics/cycle_analytics/stage.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/concerns/analytics/cycle_analytics/stage.rb b/app/models/concerns/analytics/cycle_analytics/stage.rb index dde73b567db..39e8408f794 100644 --- a/app/models/concerns/analytics/cycle_analytics/stage.rb +++ b/app/models/concerns/analytics/cycle_analytics/stage.rb @@ -15,8 +15,8 @@ module Analytics validates :name, exclusion: { in: Gitlab::Analytics::CycleAnalytics::DefaultStages.names }, if: :custom? validates :start_event_identifier, presence: true validates :end_event_identifier, presence: true - validates :start_event_label, presence: true, if: :start_event_label_based? - validates :end_event_label, presence: true, if: :end_event_label_based? + validates :start_event_label_id, presence: true, if: :start_event_label_based? + validates :end_event_label_id, presence: true, if: :end_event_label_based? validate :validate_stage_event_pairs validate :validate_labels @@ -109,8 +109,8 @@ module Analytics end def validate_labels - validate_label_within_group(:start_event_label, start_event_label_id) if start_event_label_id_changed? - validate_label_within_group(:end_event_label, end_event_label_id) if end_event_label_id_changed? + validate_label_within_group(:start_event_label_id, start_event_label_id) if start_event_label_id_changed? + validate_label_within_group(:end_event_label_id, end_event_label_id) if end_event_label_id_changed? end def validate_label_within_group(association_name, label_id) |