summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-25 09:29:26 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-25 09:29:26 +0000
commit718817fd8fcc0b3627fca73ca847d5fb676df980 (patch)
tree032014b2f7115bdae429616d1d68a193fd088d6d
parentd5e73ae63417b6593926dff81a2a63c4255d4c92 (diff)
parent04de85a994feb9fe0503ccf1bfc184333d642cc3 (diff)
downloadgitlab-ce-718817fd8fcc0b3627fca73ca847d5fb676df980.tar.gz
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
-rw-r--r--app/views/shared/projects/_project.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index 1c529c91c51..e67e5a8a638 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -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