Fixes #22556 - Correct host search for parent hostgroup
Currently, searching on a non-existant parent fails due to`hostgroup.subtree_ids` throwing a NoMethodError when no matchinghostgroup is found. This is rescued by scoped search, causing thesearch to run with no conditions instead.(seehttps://github.com/wvanbergen/scoped_search/blob/v4.1.2/lib/scoped_search/query_builder.rb#L405for the scoped_search part)
Fixes #22556 - Correct host search for parent hostgroup
Currently, searching on a non-existant parent fails due to
`hostgroup.subtree_ids` throwing a NoMethodError when no matching
hostgroup is found. This is rescued by scoped search, causing the
search to run with no conditions instead.
(see
https://github.com/wvanbergen/scoped_search/blob/v4.1.2/lib/scoped_search/query_builder.rb#L405
for the scoped_search part)