Commit 8947232b authored by Sean McGivern's avatar Sean McGivern

Allow passing exceptions when creating project services

parent 64701b51
...@@ -801,10 +801,12 @@ class Project < ActiveRecord::Base ...@@ -801,10 +801,12 @@ class Project < ActiveRecord::Base
update_column(:has_external_wiki, services.external_wikis.any?) update_column(:has_external_wiki, services.external_wikis.any?)
end end
def find_or_initialize_services def find_or_initialize_services(exceptions: [])
services_templates = Service.where(template: true) services_templates = Service.where(template: true)
Service.available_services_names.map do |service_name| available_services_names = Service.available_services_names - exceptions
available_services_names.map do |service_name|
service = find_service(services, service_name) service = find_service(services, service_name)
if 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