Render 404 if there is no project for old CI status badge
This commit is contained in:
parent
a2f61368f9
commit
01a406f5b0
|
@ -17,6 +17,7 @@ module Ci
|
||||||
# with projects migrated from GitLab CI.
|
# with projects migrated from GitLab CI.
|
||||||
#
|
#
|
||||||
def badge
|
def badge
|
||||||
|
return render_404 unless @project
|
||||||
image = Ci::ImageForBuildService.new.execute(@project, params)
|
image = Ci::ImageForBuildService.new.execute(@project, params)
|
||||||
send_file image.path, filename: image.name, disposition: 'inline', type:"image/svg+xml"
|
send_file image.path, filename: image.name, disposition: 'inline', type:"image/svg+xml"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue