diff options
author | Stan Hu <stanhu@gmail.com> | 2018-10-06 23:55:01 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-10-06 23:55:01 +0300 |
commit | c3389c8006443e2b4d994eb15e60bd249fc4732f (patch) | |
tree | cd9907005e22cee90cd646d0d994783c93fceb4c /app | |
parent | 2fce6d6f9b28bb8136c23ec89c0efe143694dbc4 (diff) | |
parent | f934b2160384a177d01f66b606d57961a1c8a3cb (diff) |
Merge branch 'bw-fix-checking-disabled-services' into 'master'51761-create-new-project-auto-populate-project-slug-string-to-project-name-if-name-is-empty
Check disabled_services when finding a service
See merge request gitlab-org/gitlab-ce!22172
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 |