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

content_views method missing in safe mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.15.0
    • Reporting
    • Moderate
    • True

      Description of problem:
      Using content_views method on a host object in report templates leads to an error, e.g. this code:

      <%- load_hosts.each_record do |h| -%>
      <%- h.content_views.each do |cv| -%>
      <%- report_row 'host': h.name, 'cv': cv.version(h.lifecycle_environments) -%>
      <%- end -%>
      <%- end -%>
      <%= report_render -%>

      ... leads to this error:
      There was an error rendering the template: undefined method '#content_views' for Host::Managed::Jail (Host::Managed)

      Version-Release number of selected component (if applicable):
      Reproduced on 6.15 and stream, probably regression from 6.14.

      How reproducible:
      Deterministic

      Steps to Reproduce:
      0. Have some host on the Satellite
      1. Create a report template containing the above code
      2. Preview the template or render it

      Actual results:
      Error message as above

      Expected results:
      Template rendered correctly, the method should contain content view list

      Additional info:
      Probably caused by introducing multiple content views

            jira-bugzilla-migration RH Bugzilla Integration
            lhellebr@redhat.com Lukas Hellebrandt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: