Bug #5625
closedundefined method `default_environment' for nil:NilClass when creating a system(content host) where environment other than Library is created and a content view is created
Description
undefined method `default_environment' for nil:NilClass
Steps:
1. new system no CV or Environments
2. create a dev life cycle environment
3. create a content view and publish for just Library
4. activation key created with Library and Default View
5. send a Post to create a System:
Processing by Katello::Api::V2::SystemsController#create as application/json;version=2
Parameters: {"name"=>"foobar", "facts"=>"[FILTERED]", "organization_id"=>"ACME_Corporation", "type"=>"system", "api_version"=>"v2", "system"=>{"name"=>"foobar", "type"=>"system", "facts"=>"[FILTERED]"}}
Result: script/rails:6:in `<main>'
Completed 500 Internal Server Error in 37.7ms (Views: 0.8ms | ActiveRecord: 2.8ms)
With body: {"displayMessage":"undefined method `default_environment' for nil:NilClass","errors":["undefined method `default_environment' for nil:NilClass"]}
Updated by Eric Helms almost 11 years ago
- Target version set to 45
- Translation missing: en.field_release set to 13
- Triaged changed from No to Yes
Updated by Eric Helms almost 11 years ago
- Is duplicate of Bug #6082: registering a client without passing env and org raises undefined method error added
Updated by Eric Helms about 10 years ago
- Translation missing: en.field_release deleted (
13)
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release set to 166