fix #1313 by checking on NullProject too

This commit is contained in:
Reinier Balt 2012-07-18 10:37:59 +02:00
parent 6ed3102885
commit 0ce61f0312

View file

@ -163,7 +163,7 @@ module TodosHelper
if (['project', 'tag', 'stats', 'search'].include?(parent_container_type))
str << item_link_to_context( todo )
end
if (['context', 'tickler', 'tag', 'stats', 'search'].include?(parent_container_type)) && todo.project_id
if (['context', 'tickler', 'tag', 'stats', 'search'].include?(parent_container_type)) && !todo.project_id.nil? && !todo.project.is_a?(NullProject)
str << item_link_to_project( todo )
end
end