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

ISE when creating a CV with org_id specified as array

XMLWordPrintable

    • Sprint 108, Sprint 109, Sprint 110, Sprint 111, Sprint 112, Sprint 113, Sprint 114, Sprint 115, Sprint 116
    • Moderate

      Description of problem:
      When creating a CV through API, I get ISE (log attached) when I specify organization ID as a list of IDs:

      $ curl -uadmin:<password> -k -H "Content-Type:application/json" -H "Accept:application/json" -X POST https://<FQDN>/katello/api/v2/content_views -d '{"name": "test1", "organization_id": [1], "api_version": "v2", "content_view": {"name": "test1", "organization_id": [1]}}'

      {"displayMessage":"undefined method `start_with?' for [1]:Array","errors":["undefined method `start_with?' for [1]:Array"]}

      The part before ":Array" is the value specified for organization_id

      Version-Release number of selected component (if applicable):
      Reproduced with Sat 6.12.0 snap 12.0 AND 6.11.3

      How reproducible:
      Deterministic

      Steps to Reproduce:
      curl -uadmin:<password> -k -H "Content-Type:application/json" -H "Accept:application/json" -X POST https://<FQDN>/katello/api/v2/content_views -d '{"name": "test1", "organization_id": [1], "api_version": "v2", "content_view": {"name": "test1", "organization_id": [1]}}'

      Actual results:
      Traceback, error, no CV created

      Expected results:
      Either CV created with the specified organization or at least correctly handled error, no ISE

            rhn-engineering-sajha Samir Jha
            satellite-focaccia-bot Focaccia Bot
            Peter Ondrejka Peter Ondrejka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: