Allow passing exceptions when creating project services
This commit is contained in:
parent
64701b51ae
commit
8947232be7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue