Bug #35816
closedInternal Server Error when creating a CV with org_id specified as array
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://<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 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://<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
Updated by The Foreman Bot almost 2 years ago
- Status changed from New to Ready For Testing
- Assignee set to Samir Jha
- Pull request https://github.com/theforeman/foreman/pull/9532 added
Updated by Anonymous almost 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|3369ff1e4600966b1fc5b60d2fb1a432adf5d891.
Updated by The Foreman Bot almost 2 years ago
- Pull request https://github.com/theforeman/foreman/pull/9552 added
Updated by Ewoud Kohl van Wijngaarden almost 2 years 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)