Description of problem:
I don't know how I got to this state but when I try to assign a policy to some host, it fails with error "undefined method `policies' for nil:NilClass".
Version-Release number of selected component (if applicable):
Reproduced on Sat 6.6 snap 20
Steps to Reproduce:
2. Hosts -> All Hosts
3. Select host
4. Select Action -> Assign Compliance Policy
undefined method `policies' for nil:NilClass
Compliance policy assigned
No traceback in production.log
It is bound to one certain policy. Operations involving it fail, e.g. assigning it to a host or changing the policy's hostgroup. Creating a new policy and using it instead, everything works.
Created attachment 1619440 [details]
Created redmine issue https://projects.theforeman.org/issues/27959 from this bug
Upstream bug assigned to email@example.com
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27959 has been resolved.
Build:Satellite 6.7 snap7
1. Create a host with policy
2. Generate arf reports for that policy and host
3. Delete the host
4. Assign the same policy to another host.
The policy assignment was successful and no errors were observed
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.