fixes #12669 - making sure that code which requires a new attribute doesn't break migrations
the lookup_value_matcher attribute code adds a callback which expects the attribute to exist, but when upgrading foreman, this can be a bit of an issue, when db:migrate touches existing hosts/hostgroups, and the attribute hasn't been added yet. Bottom line - adding a simple (cached) check for the attribute's existence, which solves this issue.
Related issues
Bug #12669: undefined method `lookup_value_matcher=' for hostgroup
fixes #12669 - making sure that code which requires a new attribute doesn't break migrations
the lookup_value_matcher attribute code adds a callback which expects
the attribute to exist, but when upgrading foreman, this can be a bit of
an issue, when db:migrate touches existing hosts/hostgroups, and the
attribute hasn't been added yet. Bottom line - adding a simple (cached)
check for the attribute's existence, which solves this issue.