Project

General

Profile

« Previous | Next » 

Revision 709e5fd0

Added by Alexander Olofsson about 4 years ago

Fixes #29719 - Hostgroup facet inheritance error (#7642)

  • Fixes #29719 - Hostgroup facet inheritance error

As the method for Hostgroup#inherited_facet_attributes - and methods
that call it - include no checks for if a hostgroup includes an
instance of the requested facet before trying to read attributes from
it, this can lead to a NoMethodError here.

Wrapping it in a safe accessor and a fallback to an empty hash means
that such calls will no longer error, and will still read attributes
correctly from the ancestry as well.

  • Fixes #29719 - Add test against inheritance error
  • added
  • modified
  • copied
  • renamed
  • deleted