Project

General

Profile

Bug #30238

undefined method `klass' for nil:NilClass

Added by Partha Aji about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

When using host filter 'applicable_errata_issued > "10 days ago"' [0], I get error "undefined method `klass' for nil:NilClass" in WebUI and attached traceback. Happens for both filtering hosts in hosts list and filtering hosts while generating templates.

Steps to Reproduce:
1. Monitoring -> Report Templates -> Host - Statuses -> Generate
2. hosts: applicable_errata_issued > "10 days ago"
3. Submit

Actual results:
Error, nothing generated

Expected results:
Successfully generated, correctly filtered report

This can also be generated via rails console

> Host.search_for('applicable_errata_issued = "10 days ago"')
NoMethodError: undefined method `klass' for nil:NilClass
from /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/scoped_search-4.1.8/lib/scoped_search/query_builder.rb:398:in `reflection_keys'

Associated revisions

Revision e62c1d83 (diff)
Added by Adam Ruzicka almost 2 years ago

Fixes #30238 - Fix undefined method `klass' when searching on hosts (#8839)

This error could be reproduced by searching like this
Host.search_for('applicable_errata_issued = "10 days ago"')

History

#1 Updated by Partha Aji about 2 years ago

  • Bugzilla link set to 1846317

#2 Updated by Ian Ballou about 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.16.0

#3 Updated by Partha Aji about 2 years ago

  • Assignee changed from Partha Aji to Adam Ruzicka

#4 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8839 added

#5 Updated by Ian Ballou about 2 years ago

  • Target version changed from Katello 3.16.0 to Katello 3.17.0

#6 Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases Katello 4.0.0 added

#7 Updated by Adam Ruzicka almost 2 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF