Commit 87000ab7 authored by Brett Walker's avatar Brett Walker

Check disabled_services when finding a service

parent ea307230
...@@ -1103,9 +1103,7 @@ class Project < ActiveRecord::Base ...@@ -1103,9 +1103,7 @@ class Project < ActiveRecord::Base
find_or_initialize_service(service_name) find_or_initialize_service(service_name)
end end
available_services.reject do |service| available_services.compact
disabled_services.include?(service.to_param)
end
end end
def disabled_services def disabled_services
...@@ -1113,6 +1111,8 @@ class Project < ActiveRecord::Base ...@@ -1113,6 +1111,8 @@ class Project < ActiveRecord::Base
end end
def find_or_initialize_service(name) def find_or_initialize_service(name)
return if disabled_services.include?(name)
service = find_service(services, name) service = find_service(services, name)
return service if service return service if service
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment