mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-21 10:36:04 +10:00
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`.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user