https://community.theforeman.org/t/editing-host-results-in-content-view-id-and-lifecycle-environment-id-must-be-provided-together/33831 If a hostgroup exists which has a CV or LCE assigned, but not both, you are unable to edit hosts assigned to this hostgroup. Attempting to update the host results in an error "content_view_id and lifecycle_environment_id must be provided together"
Created from redmine issue https://projects.theforeman.org/issues/36498
Upstream bug assigned to None
The issue doesn't seem to happen if the host's hostgroup has both CV and LCE assigned, or if the host is not assigned to a hostgroup.
Upstream bug assigned to jlenz
Moving to POST as PR merged upstream.
Tested on: 6.14 - Snap 5 Steps to test: 1. Register a host. 2. Create a Hostgroup, Content View and Lifecycle Environment 3. Edit the Hostgroup by choosing a CV and LCE, and then clicking the x on the LCE box. 4. Save, and assign the host to this Hostgroup. Expected Results: There are no errors, and the Host is successfully assigned to the Hostgroup Actual Results: There are no errors, and the Host is successfully assigned to the Hostgroup