Render 404 if there is no project for old CI status badge

This commit is contained in:
Grzegorz Bizon 2016-02-05 08:55:25 +01:00
parent a2f61368f9
commit 01a406f5b0
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ module Ci
# with projects migrated from GitLab CI.
#
def badge
return render_404 unless @project
image = Ci::ImageForBuildService.new.execute(@project, params)
send_file image.path, filename: image.name, disposition: 'inline', type:"image/svg+xml"
end