Project

General

Profile

Actions

Bug #25351

closed

NoMethodError on trends page

Added by Timo Goebel over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Trends
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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'

Actions #1

Updated by Timo Goebel over 5 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 []>
Actions #2

Updated by The Foreman Bot over 5 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
Actions #3

Updated by Tomer Brisker over 5 years ago

  • Fixed in Releases 1.21.0 added
Actions #4

Updated by Tomer Brisker over 5 years ago

  • Fixed in Releases 1.19.1, 1.20.0 added
  • Fixed in Releases deleted (1.21.0)
Actions #5

Updated by Timo Goebel over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF