fix #1121 and add tests for this

This commit is contained in:
Reinier Balt 2011-03-10 16:50:19 +01:00
parent 3711acb6ab
commit b02bb3fdde
7 changed files with 70 additions and 13 deletions

View file

@ -904,7 +904,7 @@ class TodosController < ApplicationController
@target_context_count = current_user.projects.find(project_id).todos.active.count
}
from.calendar {
@target_context_count = count_old_due_empty(@new_due_id)
@target_context_count = @new_due_id.blank? ? 0 : count_old_due_empty(@new_due_id)
}
end
@remaining_in_context = current_user.contexts.find(context_id).todos(true).active.not_hidden.count if !@remaining_in_context