summaryrefslogtreecommitdiff
path: root/app/models/service.rb
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-04-25 16:47:57 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-04-26 10:45:41 +0100
commit67974f1dfb413452ca6fc048c856360f4a843eb1 (patch)
tree0811506a774e5938634e1c38c4edc44d4a4b2a09 /app/models/service.rb
parent3ff8d8020e495df319f0b0921bc94b1c3470f6f0 (diff)
downloadgitlab-ce-67974f1dfb413452ca6fc048c856360f4a843eb1.tar.gz
remove invalid services
Diffstat (limited to 'app/models/service.rb')
-rw-r--r--app/models/service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/service.rb b/app/models/service.rb
index dc76bf925d3..cbb75186206 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -26,6 +26,7 @@ class Service < ActiveRecord::Base
has_one :service_hook
validates :project_id, presence: true, unless: proc { |service| service.template? }
+ validates :type, presence: true
scope :visible, -> { where.not(type: 'GitlabIssueTrackerService') }
scope :issue_trackers, -> { where(category: 'issue_tracker') }