summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-14 06:09:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-14 06:09:14 +0000
commit8c558095790d0b9ae67344a05975f1f84f8df837 (patch)
tree786c71e2d3d57c18ef4917e83423d0fcf609a70a /app
parent8957ace3159e5369a700a77614493ed6a8a98f93 (diff)
downloadgitlab-ce-8c558095790d0b9ae67344a05975f1f84f8df837.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/models/service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/service.rb b/app/models/service.rb
index 8f1772e67f9..d866eeb3531 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -33,7 +33,7 @@ class Service < ApplicationRecord
has_one :service_hook
validates :project_id, presence: true, unless: -> { template? || instance? }
- validates :project_id, absence: true, if: -> { instance? }
+ validates :project_id, absence: true, if: -> { template? || instance? }
validates :type, presence: true
validates :template, uniqueness: { scope: :type }, if: -> { template? }
validates :instance, uniqueness: { scope: :type }, if: -> { instance? }