summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-20 16:27:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-20 16:27:09 +0000
commitea099fb771a85c1350b92ed05aac9325370e7b5f (patch)
tree575656950813ba91b6cbf0442820350179cb99d3 /app
parent98c28b467b30e89dbec68c2f0964b87c86b46a0b (diff)
downloadredmine-ea099fb771a85c1350b92ed05aac9325370e7b5f.tar.gz
redmine-ea099fb771a85c1350b92ed05aac9325370e7b5f.zip
Don't render the issue form if issue.project is nil (#19276).
git-svn-id: http://svn.redmine.org/redmine/trunk@14146 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/issues_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 15f26e273..d38b69dd1 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -151,7 +151,13 @@ class IssuesController < ApplicationController
return
else
respond_to do |format|
- format.html { render :action => 'new' }
+ format.html {
+ if @issue.project.nil?
+ render_error :status => 422
+ else
+ render :action => 'new'
+ end
+ }
format.api { render_validation_errors(@issue) }
end
end