app/models/katello/activation_key.rb in katello-3.2.0 vs app/models/katello/activation_key.rb in katello-3.2.1
- old
+ new
@@ -96,10 +96,14 @@
cp_pools = self.get_key_pools
if cp_pools
pools = cp_pools.collect { |cp_pool| Pool.find_by(:cp_id => cp_pool['id']) }
pools.each do |pool|
- all_products << pool.subscription.products
+ if pool.subscription
+ all_products << pool.subscription.products
+ else
+ Rails.logger.error("Pool #{pool.id} is missing its subscription id.")
+ end
end
end
all_products.flatten!
end