##// END OF EJS Templates
Don't render the issue form if issue.project is nil (#19276)....
Jean-Philippe Lang -
r13764:ea099fb771a8
parent child
Show More
@@ -151,7 +151,13 class IssuesController < ApplicationController
151 151 return
152 152 else
153 153 respond_to do |format|
154 format.html { render :action => 'new' }
154 format.html {
155 if @issue.project.nil?
156 render_error :status => 422
157 else
158 render :action => 'new'
159 end
160 }
155 161 format.api { render_validation_errors(@issue) }
156 162 end
157 163 end
@@ -2218,7 +2218,7 class IssuesControllerTest < ActionController::TestCase
2218 2218 :issue => {:project_id => 3,
2219 2219 :tracker_id => 2,
2220 2220 :subject => 'Foo'}
2221 assert_response 403
2221 assert_response 422
2222 2222 end
2223 2223 end
2224 2224
General Comments 0
You need to be logged in to leave comments. Login now