diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-24 15:58:21 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-24 15:58:21 +0200 |
commit | 01333d40882bfb1d05ba5d0cca2ded0c461aac9a (patch) | |
tree | f8af7b34ee94c788b8d931812327cdbc267c10e0 | |
parent | 0df61acac6311fe637d92468c83e0bb868f4aa00 (diff) | |
download | gitlab-ci-01333d40882bfb1d05ba5d0cca2ded0c461aac9a.tar.gz |
Fix 500 error with badge for pending build
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | app/services/image_for_build_service.rb | 6 |
3 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,6 @@ +v5.4 + - Fixed 500 error for badge if build is pending + v5.3 - Remove annoying 'Done' message from schedule_builds cron job - Fix a style issue with the navbar @@ -1 +1 @@ -5.3.0 +5.4.0.pre diff --git a/app/services/image_for_build_service.rb b/app/services/image_for_build_service.rb index 7dfcfaa..382e969 100644 --- a/app/services/image_for_build_service.rb +++ b/app/services/image_for_build_service.rb @@ -24,6 +24,10 @@ class ImageForBuildService def image_for_commit(commit) return 'unknown.png' unless commit - commit.status + ".png" + if commit.status == 'pending' + 'running.png' + else + commit.status + ".png" + end end end |