fix #1313 by checking on NullProject too

This commit is contained in:
Reinier Balt 2012-07-18 10:37:59 +02:00
parent 3a3a1ac22e
commit e8c3ba2e28

View file

@ -170,7 +170,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