Merge branch 'handle-bad-head' into 'master'
Fix Error 500 occuring with repositories that have a bad HEAD A repository could have objects but no valid HEAD, causing `project.commit` to be `nil`. See merge request !1433
This commit is contained in:
commit
718817fd8f
|
@ -18,7 +18,7 @@
|
|||
= project.name
|
||||
|
||||
.project-controls
|
||||
- if ci && !project.empty_repo?
|
||||
- if ci && !project.empty_repo? && project.commit
|
||||
- if ci_commit = project.ci_commit(project.commit.sha)
|
||||
= link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}",
|
||||
title: "Build status: #{ci_commit.status}", data: {toggle: 'tooltip', placement: 'left'} do
|
||||
|
|
Loading…
Reference in New Issue