diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-10-06 17:43:40 +0300 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-10-06 23:07:54 +0300 |
commit | f934b2160384a177d01f66b606d57961a1c8a3cb (patch) | |
tree | f319e392ab4b7e9c6c41c4647c7f8d360c88317a /app | |
parent | 54c442af23169cc146bb6bb2484ca2d3d98ef870 (diff) |
Check disabled_services when finding a service
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 3fa47c1cda3..0cdd876dc20 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1088,9 +1088,7 @@ class Project < ActiveRecord::Base find_or_initialize_service(service_name) end - available_services.reject do |service| - disabled_services.include?(service.to_param) - end + available_services.compact end def disabled_services @@ -1098,6 +1096,8 @@ class Project < ActiveRecord::Base end def find_or_initialize_service(name) + return if disabled_services.include?(name) + service = find_service(services, name) return service if service |