Actions
Bug #14123
closedStop associating chef environment as puppet environment in 0.3
Status:
Closed
Priority:
Normal
Assignee:
Category:
foreman_chef
Target version:
Description
Since we have our own model for Chef environments we have to stop associating it to puppet environment relation, otherwise getting following trace
2016-03-09 16:20:01 [app] [W] Action failed | ActiveRecord::AssociationTypeMismatch: Environment(#87990400) expected, got ForemanChef::Environment(#84514540) | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/association.rb:216:in `raise_on_type_mismatch!' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/belongs_to_association.rb:12:in `replace' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/singular_association.rb:17:in `writer' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/builder/association.rb:118:in `environment=' | /usr/share/foreman/app/models/host/managed.rb:472:in `populate_fields_from_facts' | /usr/share/foreman/app/models/host/base.rb:151:in `import_facts'
Actions