AlekSi/redmine_code_review — Issue #2: Create new project ERROR on V0.5.1
Author: wuchang
Created: 2011-10-09 17:14:23+00:00
State: open

throw the error when i want to create a new project 。

Processing ProjectsController#new (for xxxx at 2011-10-10 00:33:20) [GET]
Parameters: {"action"=>"new", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/new

ActionView::TemplateError (undefined method `tracker_id' for nil:NilClass) on line #28 of vendor/plugins/redmine_code_review/app/vie ws/code_review/_body_bottom.rhtml:
25: is_target = false unless User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, project)
26: setting = CodeReviewProjectSetting.find(:first, :conditions => ['project_id = ?', project.id])
27: is_target = false unless setting
28: is_target = false unless setting.tracker_id
29: action_name = controller.action_name
30: is_target = false unless action_name
31: is_target = false unless (controller.class.name == 'RepositoriesController' or controller.class.name == 'AttachmentsController ')