Bug #30725
closedhammer content-view version incremental-update fails with ISE
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1867239
Description of problem:
These commands:
hammer -d content-view version incremental-update --content-view-version-id 9 --errata-ids 5
hammer -d content-view version incremental-update --content-view-version-id 9 --errata-ids 5 --lifecycle-environment-ids 8
fail to with:
500 Internal Server Error
"undefined method `first' for nil:NilClass"
Version-Release number of selected component (if applicable):
6,8 Snap 11
[root@dhcp-2-186 ~]# rpm -q satellite
satellite-6.8.0-0.7.beta.el7sat.noarch
[root@dhcp-2-186 ~]# rpm -q tfm-rubygem-katello
tfm-rubygem-katello-3.16.0-0.16.rc5.1.el7sat.noarch
How reproducible:
fails with API commands and hammer commands
Steps to Reproduce:
1. Create CV with fake errata
2. Create another empty CV
3. Try to use incremental-update command to add an erratuim to a version of CV
Actual results:
hammer -d shows:
[ERROR 2020-08-07T12:04:04 API] 500 Internal Server Error
[DEBUG 2020-08-07T12:04:04 API] {
"displayMessage" => "undefined method `first' for nil:NilClass",
"errors" => [
[0] "undefined method `first' for nil:NilClass"
]
}
Expected results:
CV version is created with errratum
Additional info:
also fails when using API