Project

General

Profile

Actions

Bug #16931

closed

better handle pools with missing subscription ids when listing akeys

Added by Justin Sherrill about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Activation Key
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

If for some reason a pool is not properly indexed and is missing its associated subscription, listing activation keys will fail with:

2016-10-06 17:39:52 [app] [E] NoMethodError: undefined method `products' for nil:NilClass | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/activation_key.rb:103:in `block in products' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/activation_key.rb:102:in `each' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/activation_key.rb:102:in `products' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/helpers.rb:14:in `data_object'

we should handle this better

Actions

Also available in: Atom PDF