Bug #23823
closedsubscriptions pages/api errors with 'NoMethodError: undefined method `id' for nil:NilClass'
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1580436
Description of problem:
Customer reported, after upgrade to 6.3.1, his subscription pages erroring with:
2018-05-18 21:00:18 d0f6c16b [app] [I] Started GET "/api/v2/hosts?organization_id=3&page=1&paged=true&per_page=50&search=&sort_by=name&sort_order=ASC" for
2018-05-18 21:00:18 7d017c23 [app] [I] Rendered home/_submenu.html.erb (0.9ms)
2018-05-18 21:00:18 7d017c23 [app] [I] Rendered home/_user_dropdown.html.erb (2.0ms)
2018-05-18 21:00:18 7d017c23 [app] [I] Read fragment views/tabs_and_title_records-4 (0.1ms)
2018-05-18 21:00:18 d0f6c16b [app] [I] Processing by Api::V2::HostsController#index as JSON
2018-05-18 21:00:18 d0f6c16b [app] [I] Parameters: {"organization_id"=>"3", "page"=>"1", "paged"=>"true", "per_page"=>"50", "search"=>"", "sort_by"=>"name", "sort_order"=>
"ASC", "apiv"=>"v2"}
2018-05-18 21:00:18 7d017c23 [app] [I] Rendered home/_organization_dropdown.html.erb (2.9ms)
2018-05-18 21:00:18 d0f6c16b [app] [I] Current user: (administrator)
2018-05-18 21:00:18 d0f6c16b [app] [I] Expire fragment views/tabs_and_title_records-4 (0.1ms)
2018-05-18 21:00:38 d706e273 [app] [E] NoMethodError: undefined method `id' for nil:NilClass | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64.2/app/views/katello/api/v2/subscriptions/base.json.rabl:22:in `block in eval_source' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/builder.rb:152:in `node' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/builder.rb:114:in `block in compile_settings' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/builder.rb:113:in `each' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/builder.rb:113:in `compile_settings' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/builder.rb:58:in `block in to_hash' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/builder.rb:248:in `cache_results' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/builder.rb:49:in `to_hash' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/engine.rb:86:in `to_hash' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/engine.rb:48:in `block in render' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/engine.rb:382:in `cache_results' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.12.0/lib/rabl/engine.rb:47:in `render'
Version-Release number of selected component (if applicable):
6.3.1.1
How reproducible:
Unknown
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Stephen Benjamin
- Pull request https://github.com/Katello/katello/pull/7423 added
Updated by John Mitsch over 6 years ago
- Subject changed from subscriptions pages/api errors with 'NoMethodError: undefined method `id' for nil:NilClass' to subscriptions pages/api errors with 'NoMethodError: undefined method `id' for nil:NilClass'
- Translation missing: en.field_release set to 338
Updated by Brad Buckingham over 6 years ago
- Status changed from Ready For Testing to Closed
Moving to closed, since referenced PR is merged. Confirmed that there are no additional changes needed.
Updated by Jonathon Turel over 6 years ago
- Related to Bug #24892: 3.6 to 3.7 upgrade issue: katello_pools_hypervisor_fk constraint violation added