Bug #14309
closedOn copy any existing CV raises error: NoMethodError: undefined method `composite?' for nil:NilClass
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1317771
Description of problem: On copy any existing CV raises error: NoMethodError: undefined method `composite?' for nil:NilClass
2016-03-15 08:20:47 [app] [I] Started POST "/katello/api/v2/content_views/5/copy?organization_id=1" for 10.65.193.200 at 2016-03-15 08:20:47 +0100
2016-03-15 08:20:47 [app] [I] Processing by Katello::Api::V2::ContentViewsController#copy as JSON
2016-03-15 08:20:47 [app] [I] Parameters: {"id"=>"5", "content_view"=>{"name"=>"exclusive_ostree_copy"}, "organization_id"=>"1", "api_version"=>"v2"}
2016-03-15 08:20:47 [app] [E] NoMethodError: undefined method `composite?' for nil:NilClass
| /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.6/app/models/katello/content_view_repository.rb:24:in `content_view_composite'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:184:in `call'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:184:in `block in simple'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `call'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `block in simple'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `call'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `block in simple'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations.rb:377:in `run_validations!'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations/callbacks.rb:111:in `block in run_validations!'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations/callbacks.rb:111:in `run_validations!'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations.rb:318:in `valid?'
Version-Release number of selected component (if applicable):
sat 6.2 snap3
How reproducible:
always
Steps to Reproduce:
1. create a CV
2. add yum/puppet/ostree repos
3. publish promote
4. copy the CV created in step1
Actual results:
On copy any existing CV raises error: NoMethodError: undefined method `composite?' for nil:NilClass
Expected results:
copy CV should succeed.
Additional info:
Note this is the issue with Copy CV, containing any type of contents.. not just with ostree contents.