Skip to content
Snippets Groups Projects
Commit 38823e3e authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'optimize-project-ci-services' into 'master'

Optimize Project#ci_service(s)

Related issue: gitlab-org/gitlab-ce#14186

See merge request !3158
parents a1f45310 f2992cf3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -528,11 +528,11 @@ class Project < ActiveRecord::Base
end
 
def ci_services
services.select { |service| service.category == :ci }
services.where(category: :ci)
end
 
def ci_service
@ci_service ||= ci_services.find(&:activated?)
@ci_service ||= ci_services.reorder(nil).find_by(active: true)
end
 
def jira_tracker?
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment