Project

General

Profile

Actions

Bug #35816

closed

Internal Server Error when creating a CV with org_id specified as array

Added by Samir Jha over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2129950

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://&lt;FQDN&gt;/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 katello 4.5 AND 4.3

How reproducible:
Deterministic

Steps to Reproduce:
curl -uadmin:<password> -k -H "Content-Type:application/json" -H "Accept:application/json" -X POST https://&lt;FQDN&gt;/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

Actions #1

Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Assignee set to Samir Jha
  • Pull request https://github.com/theforeman/foreman/pull/9532 added
Actions #2

Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.6.0 added
Actions #3

Updated by Anonymous over 1 year ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot over 1 year ago

  • Pull request https://github.com/theforeman/foreman/pull/9552 added
Actions #5

Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.5.0 added
Actions #6

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Subject changed from ISE when creating a CV with org_id specified as array to Internal Server Error when creating a CV with org_id specified as array
  • Category changed from 19 to API
  • Triaged changed from No to Yes
  • Fixed in Releases deleted (3.6.0)
Actions

Also available in: Atom PDF