diff options
author | Rémy Coutable <remy@rymai.me> | 2017-07-10 11:13:48 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-07-11 15:39:47 +0100 |
commit | 05f3f67139f37078ab43e3743884cf9bbaa0ef46 (patch) | |
tree | 83112f3bdf306bd0ba6b33af96f19962402cd648 | |
parent | 20d467cb6e37047af444e9295a1f0364ad334512 (diff) | |
download | gitlab-ce-05f3f67139f37078ab43e3743884cf9bbaa0ef46.tar.gz |
Merge branch 'backport-exceptions-argument' into 'master'
Allow passing exceptions when creating project services
See merge request !12745
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index d0e02e4e585..d5760164663 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -801,10 +801,12 @@ class Project < ActiveRecord::Base update_column(:has_external_wiki, services.external_wikis.any?) end - def find_or_initialize_services + def find_or_initialize_services(exceptions: []) 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) if service |