Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-17444

undefined method `[]' for nil:NilClass" or undefined method `last' for nil:NilClass" when generating Host - applied errata report

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 6.11.5
    • Reporting
    • 0
    • False
    • Moderate
    • Sprint 120
    • None
    • None
    • None
    • None

      Description of problem:
      Getting one of the following errors while generating the Host - Applied Errata report.

      • undefined method `[]' for nil:NilClass"
      • undefined method `last' for nil:NilClass"

      The first error is caused by task input returns nil because the code is fetching it the wrong way.
      The second error will happen if an erratum that user tried to apply to the hosts doesn't exist in the database or is invalid. E.g. typo error.

      Steps to reproduce:
      1. In the "Run Job" page, use Katello SSH to apply errata to one or more hosts. In the errata field, simply enter any invalid errata.
      2. Wait for the job to finish.
      3. Generate the Host - Applied Errata report.

      Actual results:
      undefined method `last' for nil:NilClass"

      Expected results:
      Report can be generated successfully.

      Additional info:

          There are no Sub-Tasks for this issue.

              rhn-support-hyu Hao Chang Yu
              ehelms@redhat.com Eric Helms
              Cole Higgins Cole Higgins
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: