Project

General

Profile

Bug #15788

Discovery widget crashes for hosts without reports

Added by Daniel Lobato Garcia over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Discovery plugin
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

The widget is calling 'host.last_report < 7.days.ago' - which fails with "ActionView::Template::Error (undefined method `<' for nil:NilClass)" if the host has no reports.

Associated revisions

Revision 6e4e0287 (diff)
Added by Daniel Lobato Garcia over 6 years ago

Fixes #15788 - Discovery widget crashes for hosts w/o reports

The widget is calling 'host.last_report < 7.days.ago' - which fails with
"ActionView::Template::Error (undefined method `<' for nil:NilClass')"
if the host has no reports. This crashes the whole dashboard page.

History

#1 Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman_discovery/pull/288 added

#2 Updated by Daniel Lobato Garcia over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF