Project

General

Profile

Actions

Bug #23823

closed

subscriptions pages/api errors with 'NoMethodError: undefined method `id' for nil:NilClass'

Added by Stephen Benjamin almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Subscriptions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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


Related issues 1 (0 open1 closed)

Related to Katello - Bug #24892: 3.6 to 3.7 upgrade issue: katello_pools_hypervisor_fk constraint violationClosedStephen BenjaminActions
Actions #1

Updated by The Foreman Bot almost 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
Actions #2

Updated by John Mitsch almost 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
Actions #3

Updated by Brad Buckingham almost 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.

Actions #4

Updated by Jonathon Turel over 5 years ago

  • Related to Bug #24892: 3.6 to 3.7 upgrade issue: katello_pools_hypervisor_fk constraint violation added
Actions

Also available in: Atom PDF