Fix a bug that occured when an action's project was changed from nil to an actual project.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@329 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2006-10-16 06:04:37 +00:00
parent 77bb3f556c
commit c8f4f34f24

View file

@ -139,7 +139,7 @@ class TodoController < ApplicationController
@context_changed = @original_item_context_id != @item.context_id
if @context_changed then @remaining_undone_in_context = @user.contexts.find(@original_item_context_id).not_done_todos.length; end
@project_changed = @original_item_project_id != @item.project_id
if @project_changed then @remaining_undone_in_project = @user.projects.find(@original_item_project_id).not_done_todos.length; end
if (@project_changed && !@original_item_project_id.nil?) then @remaining_undone_in_project = @user.projects.find(@original_item_project_id).not_done_todos.length; end
end
def update_context