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/integration.rb')
-rw-r--r--app/models/integration.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/integration.rb b/app/models/integration.rb
index 618f9f986e8..8ebf24b1663 100644
--- a/app/models/integration.rb
+++ b/app/models/integration.rb
@@ -19,8 +19,8 @@ class Integration < ApplicationRecord
self.inheritance_column = :type_new
INTEGRATION_NAMES = %w[
- asana assembla bamboo bugzilla buildkite campfire clickup confluence custom_issue_tracker datadog discord
- drone_ci emails_on_push ewm external_wiki hangouts_chat harbor irker jira
+ asana assembla bamboo bugzilla buildkite campfire clickup confluence custom_issue_tracker
+ datadog diffblue_cover discord drone_ci emails_on_push ewm external_wiki hangouts_chat harbor irker jira
mattermost mattermost_slash_commands microsoft_teams packagist pipelines_email
pivotaltracker prometheus pumble pushover redmine slack slack_slash_commands squash_tm teamcity telegram
unify_circuit webex_teams youtrack zentao
@@ -638,7 +638,9 @@ class Integration < ApplicationRecord
end
def validate_belongs_to_project_or_group
- errors.add(:project_id, 'The service cannot belong to both a project and a group') if project_level? && group_level?
+ return unless project_level? && group_level?
+
+ errors.add(:project_id, 'The integration cannot belong to both a project and a group')
end
def validate_recipients?