Bug #16960
closedundefined method `+' for nil:NilClass when viewing third-party rpm
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1384673
Description of problem:
Opening Content > Packages in the WebUI and clicking on a third-party rpm uploaded to custom repo results in the webui showing the following error:
undefined method `+' for nil:NilClass
The Details, Files, Dependencies, and Repositories tabs are not displayed for the rpm
How reproducible:
Reproducable on katello master.
Steps to Reproduce:
1. Upload chef-11.2.0-1.el6.x86_64.rpm to a custom repo with hammer
2. Open Content > Packages and search for the rpm
3. Click the link to display the package details
Actual results:
Error is shown and details are not
Expected results:
Details are show without error
There is a large backtrace in the logs when this occurs, starting with:
2016-10-13 14:27:46 [app] [E] NoMethodError: undefined method `+' for nil:NilClass | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/services/katello/pulp/rpm.rb:34:in `files' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/helpers.rb:20:in `data_object_attribute' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:140:in `attribute' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:114:in `block in compile_settings' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:113:in `each' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:113:in `compile_settings' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:53:in `block in to_hash' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:248:in `cache_results' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:49:in `to_hash'
Updated by Brad Buckingham about 8 years ago
- Subject changed from undefined method `+' for nil:NilClass when viewing third-party rpm to undefined method `+' for nil:NilClass when viewing third-party rpm
- Assignee set to Brad Buckingham
- Target version set to 129
- Translation missing: en.field_release set to 162
- Difficulty set to easy
Updated by The Foreman Bot about 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/6400 added
Updated by Brad Buckingham about 8 years ago
- Target version changed from 129 to 133
Updated by Brad Buckingham about 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|d1f188b6e939fbd4cb6e815a97db493d1a9abc3d.