Bug #282
closedNoMethodError in Dashboard#OutOfSync
Description
NoMethodError in Dashboard#OutOfSync
Showing app/views/hosts/_minilist.html.erb where line #24 raised:
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
Extracted source (around line #24):
21: <td><%=h host.try(:environment) ></td>
22: <td><=h host.try(:model) ></td>
23: <td><=h host.try(:hostgroup) ></td>
24: <td><=last_report_column(host) ></td>
25: <td>
26: <= link_to 'Edit', edit_host_url(host) >
27: <= link_to 'Clone', clone_host_url(host) %>
RAILS_ROOT: /usr/share/foreman
Application Trace | Framework Trace | Full Trace
/usr/share/foreman/app/helpers/hosts_helper.rb:6:in `last_report_column'
/usr/share/foreman/app/views/hosts/_minilist.html.erb:24:in `_run_erb_app47views47hosts47_minilist46html46erb_locals_header_hosts_minilist_object'
/usr/share/foreman/app/views/hosts/_minilist.html.erb:14:in `each'
/usr/share/foreman/app/views/hosts/_minilist.html.erb:14:in `_run_erb_app47views47hosts47_minilist46html46erb_locals_header_hosts_minilist_object'
/usr/share/foreman/app/views/hosts/_minilist.html.erb:2:in `_run_erb_app47views47hosts47_minilist46html46erb_locals_header_hosts_minilist_object'
/usr/share/foreman/app/controllers/dashboard_controller.rb:43:in `OutOfSync'
/usr/share/foreman/app/controllers/dashboard_controller.rb:38:in `OutOfSync'
Request
Parameters:
None
Show session dump
Response
Headers:
{"Content-Type"=>"text/html",
"Cache-Control"=>"no-cache"}