Project

General

Profile

Bug #188

Fact, Class, State combined filter doesn't work

Added by Dis Connect over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

irb(main):006:0> gethosts(query = { "fact" => { "kernel" => "Linux" }, "state" => "all"}).length
=> 205
irb(main):007:0> gethosts(query = { "fact" => { "kernel" => "Linux" }, "class" => "memcached" , "state" => "all"}).length
NoMethodError: undefined method `length' for nil:NilClass
from (irb):7

(web UI still shows 15 hosts that should match that test)


Related issues

Is duplicate of Foreman - Refactor #191: Query should return all hosts, not just recent.Closed

History

#1 Updated by Ohad Levy over 12 years ago

can you confirm this still happens after the fix for #191?

#2 Updated by Dis Connect over 12 years ago

  • Status changed from New to Closed

That fixed it.

irb(main):003:0> gethosts(query = { "fact" => { "kernel" => "Linux" }, "class" => "memcached" , "state" => "all"}).length
=> 15
irb(main):004:0> gethosts(query = { "fact" => { "kernel" => "Linux" }, "class" => "memcached" }).length
NoMethodError: undefined method `length' for nil:NilClass
    from (irb):4

Also available in: Atom PDF