ToDo's broken after moving/deleting issues in v8.6.1
After moving a few issues to other projects and deleting issues my ToDo's are broken in v8.6.1.
Trying to click on my Todo's raises a 500 error.
I see this error in the logs:
Started GET "/dashboard/todos" for 96.27.13.177 at 2016-03-24 12:26:06 +0000
Processing by Dashboard::TodosController#index as HTML
Completed 500 Internal Server Error in 67ms (ActiveRecord: 6.4ms)
ActionView::Template::Error (undefined method `to_reference' for nil:NilClass):
10: (removed)
11: %span.todo-label
12: = todo_action_name(todo)
13: = todo_target_link(todo)
14:
15: · #{time_ago_with_tooltip(todo.created_at)}
16:
app/models/todo.rb:74:in `target_reference'
app/helpers/todos_helper.rb:19:in `todo_target_link'
app/views/dashboard/todos/_todo.html.haml:13:in `_app_views_dashboard_todos__todo_html_haml__583425280378994058_44249340'
app/views/dashboard/todos/index.html.haml:55:in `block in _app_views_dashboard_todos_index_html_haml___2732164334588148734_67441660'
app/views/dashboard/todos/index.html.haml:48:in `each'
app/views/dashboard/todos/index.html.haml:48:in `_app_views_dashboard_todos_index_html_haml___2732164334588148734_67441660'
lib/gitlab/middleware/go.rb:16:in `call'