diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-07-10 16:32:08 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-07-10 16:36:07 +0200 |
commit | af0c054c6da2a1b140367c811b63a550e093596e (patch) | |
tree | 223452100380083dbc1a14b155735dc1d1144c69 /app/models | |
parent | 49f8697a4966affd27a49ee697dd4d72f6003e13 (diff) | |
download | gitlab-ce-af0c054c6da2a1b140367c811b63a550e093596e.tar.gz |
Resolve Gitaly N+1 for CI/CD environments statuses
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index bfc35b77b8f..3648025b8fa 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1914,9 +1914,8 @@ class Project < ApplicationRecord @route_maps_by_commit ||= Hash.new do |h, sha| h[sha] = begin data = repository.route_map_for(sha) - next unless data - Gitlab::RouteMap.new(data) + Gitlab::RouteMap.new(data) if data rescue Gitlab::RouteMap::FormatError nil end |