1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-12 04:03:08 +00:00

Prevent undefined method `[]' for nil:NilClass error in issues_controller.rb:140 (#1132).

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1376 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-04-28 17:03:01 +00:00
parent ed74c2a8a2
commit 420bcf0160

View File

@ -137,7 +137,7 @@ class IssuesController < ApplicationController
@project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) } :
@issue.custom_values
else
requested_status = IssueStatus.find_by_id(params[:issue][:status_id])
requested_status = (params[:issue] && params[:issue][:status_id] ? IssueStatus.find_by_id(params[:issue][:status_id]) : default_status)
# Check that the user is allowed to apply the requested status
@issue.status = (@allowed_statuses.include? requested_status) ? requested_status : default_status
@custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x,