summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorkazubu <kazubu@jtime.net>2015-10-26 00:02:32 +0900
committerkazubu <kazubu@jtime.net>2015-10-26 15:06:55 +0900
commitc3d48f97355371d6c8760e05637f666f23c2a76a (patch)
tree31d83e9fa642c79c14211a68b5c73293efef6528 /app/controllers/projects_controller.rb
parentf66ec1bc8157e5481ba23660b226267293c85129 (diff)
downloadgitlab-ce-c3d48f97355371d6c8760e05637f666f23c2a76a.tar.gz
Fix: 500 error returned if destroy request without HTTP referer
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 82119022cf9..743c429b72e 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -124,7 +124,7 @@ class ProjectsController < ApplicationController
::Projects::DestroyService.new(@project, current_user, {}).execute
flash[:alert] = "Project '#{@project.name}' was deleted."
- if request.referer.include?('/admin')
+ if request.referer.present? && request.referer.include?('/admin')
redirect_to admin_namespaces_projects_path
else
redirect_to dashboard_projects_path