Actions
Bug #25351
closedNoMethodError on trends page
Description
NoMethodError: undefined method `hosts' for nil:NilClass
from app/models/trends/foreman_trend.rb:36:in `find_hosts'
from app/views/trends/_hosts.html.erb:1:in `_9bfd9ea732717462dcfbf0372a86b63c'
from action_view/template.rb:157:in `block in render'
Updated by Timo Goebel almost 6 years ago
This happens because
#<ForemanTrend id: 182, trendable_type: "Operatingsystem", trendable_id: 3, name: nil, type: "ForemanTrend", fact_value: "CentOS 6.5", fact_name: nil, created_at: "2016-04-19 19:56:58", updated_at: "2016-04-19 19:56:58">
links to an OS that does not exist
Operatingsystem.where(id: 3) => #<ActiveRecord::Relation []>
Updated by The Foreman Bot almost 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Timo Goebel
- Pull request https://github.com/theforeman/foreman/pull/6185 added
Updated by Tomer Brisker almost 6 years ago
- Fixed in Releases 1.19.1, 1.20.0 added
- Fixed in Releases deleted (
1.21.0)
Updated by Timo Goebel almost 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset badb4a7f47adddb92ede06f2201e9d2969345e3e.
Actions