Bug #12898
closedcreating a host with content view and lifecycle enviroment fails with mass security assignment
Description
| ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes for Host::Managed: content_facet_attributes): | app/models/host/base.rb:97:in `initialize' | app/models/host/managed.rb:45:in `initialize' | app/models/concerns/foreman/sti.rb:22:in `new_with_cast' | app/models/host.rb:15:in `method_missing' | app/controllers/hosts_controller.rb:580:in `process_hostgroup' | app/controllers/concerns/application_shared.rb:13:in `set_timezone' | app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' | lib/middleware/catch_json_parse_errors.rb:9:in `call'
Updated by John Mitsch over 9 years ago
I was able to create the host, but when clicking edit, sometime the content view and lifecycle environment do not show up. The correct values of cv and lifecycle environment id are saved in the DB, but they are showing in the edit form. This could be a fluke, but when I put a debugger in https://github.com/Katello/katello/blob/master/app/helpers/katello/hosts_and_hostgroups_helper.rb#L65 the form loads correctly.
Updated by John Mitsch over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|de830d36962adf14b71921748529b2885616d22d.