Bug #17815
closedGetting undefined method `name' for nil:NilClass when trying edit/view a host group
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1372917
Description of problem:
When trying to view or edit a host group the following error is seen in the webui:
undefined method `name' for nil:NilClass
The entire traceback can be found here: http://pastebin.test.redhat.com/40871
How reproducible:
So far, unable to reproduce.
Steps to Reproduce:
1. Attach properties to host group (puppet modules, kickstarts, etc)
2. Remove property being used in host group
3. Attempt to view/edit group
Actual results:
Removing a property being used by a host group renders the group inaccessible
Expected results:
Removing a property in use by the group should simply remove the property from the group and still be able to be edited.
Updated by Tomer Brisker almost 8 years ago
Actual reproducer:
1. Create HG with os, arch and content view and save.
2. Edit same HG and remove the arch and os, save.
3. Reopen the HG - it crashes.
Stack trace: | NoMethodError: undefined method `name' for nil:NilClass | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/models/katello/concerns/redhat_extensions.rb:76:in `distribution_repositories' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/models/katello/concerns/redhat_extensions.rb:59:in `kickstart_repos' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/helpers/katello/hosts_and_hostgroups_helper.rb:190:in `kickstart_repository_options' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/helpers/katello/hosts_and_hostgroups_helper.rb:56:in `kickstart_repository_id' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/helpers/katello/hosts_and_hostgroups_helper.rb:43:in `use_install_media' | /usr/share/foreman/app/views/common/os_selection/_operatingsystem.html.erb:2:in `block in _5e049f3c8b8a59d4b5ba7658ce33472b'
Updated by The Foreman Bot almost 8 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomer Brisker
- Pull request https://github.com/Katello/katello/pull/6508 added
Updated by Justin Sherrill almost 8 years ago
- Category set to Hosts
- Translation missing: en.field_release set to 188
Updated by Anonymous almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|a3d8942292fef71ab4d494208f1970b361664f93.