Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-05 10:55:25 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-11 12:29:14 +0300
commit01a406f5b02a7c8f5133012931b56696c3d21fe8 (patch)
treed9fdfd75524eababcd600ffb60d6bd514f2c9458 /app/controllers/ci
parenta2f61368f9d62cded366a3b8813969f66c4be4dd (diff)
Render 404 if there is no project for old CI status badge
Diffstat (limited to 'app/controllers/ci')
-rw-r--r--app/controllers/ci/projects_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb
index 7838994433e..d1824b481d7 100644
--- a/app/controllers/ci/projects_controller.rb
+++ b/app/controllers/ci/projects_controller.rb
@@ -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