@@ -151,7 +151,13 class IssuesController < ApplicationController | |||||
151 | return |
|
151 | return | |
152 | else |
|
152 | else | |
153 | respond_to do |format| |
|
153 | respond_to do |format| | |
154 |
format.html { |
|
154 | format.html { | |
|
155 | if @issue.project.nil? | |||
|
156 | render_error :status => 422 | |||
|
157 | else | |||
|
158 | render :action => 'new' | |||
|
159 | end | |||
|
160 | } | |||
155 | format.api { render_validation_errors(@issue) } |
|
161 | format.api { render_validation_errors(@issue) } | |
156 | end |
|
162 | end | |
157 | end |
|
163 | end |
@@ -2218,7 +2218,7 class IssuesControllerTest < ActionController::TestCase | |||||
2218 | :issue => {:project_id => 3, |
|
2218 | :issue => {:project_id => 3, | |
2219 | :tracker_id => 2, |
|
2219 | :tracker_id => 2, | |
2220 | :subject => 'Foo'} |
|
2220 | :subject => 'Foo'} | |
2221 |
assert_response 4 |
|
2221 | assert_response 422 | |
2222 | end |
|
2222 | end | |
2223 | end |
|
2223 | end | |
2224 |
|
2224 |
General Comments 0
You need to be logged in to leave comments.
Login now