Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1079981 - Passing incorrect organization 'id' to product create should return 404
Summary: Passing incorrect organization 'id' to product create should return 404
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Adam Price
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-24 12:46 UTC by Adam Saleh
Modified: 2019-09-25 20:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:06:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 4795 0 None None None 2016-04-22 15:05:30 UTC

Description Adam Saleh 2014-03-24 12:46:21 UTC
Description of problem:
Creating product by api doesn't work

Version-Release number of selected component (if applicable):
{"name":"katello","version":"1.5.0-14.201403231838gitb03147e.el6"}

How reproducible:
Foreman with kattello installed required.


Steps to Reproduce:
curl -X POST -k -u admin:changeme -H "Content-Type: application/json" 'https://qetello01.usersys.redhat.com/katello/api/v2/products/' -d '{"organization_id": 1, "description": "test-prod-desc", "name": "test-product1"}' 

Actual results:
{"displayMessage":"PGError: ERROR: operator does not exist: character varying = integer\nLINE 1: ...\"taxonomies\".\"deletion_task_id\" IS NULL AND (name = 1 or lab...\n ^\nHINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.\n: SELECT \"taxonomies\".* FROM \"taxonomies\" WHERE \"taxonomies\".\"type\" IN ('Organization') AND \"taxonomies\".\"deletion_task_id\" IS NULL AND (name = 1 or label = 1) ORDER BY title LIMIT 1","errors":["PGError: ERROR: operator does not exist: character varying = integer\nLINE 1: ...\"taxonomies\".\"deletion_task_id\" IS NULL AND (name = 1 or lab...\n ^\nHINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.\n: SELECT \"taxonomies\".* FROM \"taxonomies\" WHERE \"taxonomies\".\"type\" IN ('Organization') AND \"taxonomies\".\"deletion_task_id\" IS NULL AND (name = 1 or label = 1) ORDER BY title LIMIT 1"]}

Expected results:
200 response accomanied with product hash

Additional info:
Same error when creating provider.

In redmine
http://projects.theforeman.org/issues/4795

Comment 1 RHEL Program Management 2014-03-24 12:55:35 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Og Maciel 2014-03-24 13:57:40 UTC
Adam: inecas has suggested that you try to pass a string "1" instead of 1 for the organization-id... see if that works?

Comment 4 Adam Saleh 2014-03-24 16:02:52 UTC
Ok, you need to suply the LABEL, not id ... on the other hand, still think this is a bug, and that the error message should be caught much earlier :-)

Comment 6 Lukas Zapletal 2014-04-04 14:43:25 UTC
This bug should be in "sync", but I have no idea what it means. Hopefully this will show up in Redmine automatically.

Comment 7 Adam Price 2014-04-14 21:25:34 UTC
https://github.com/Katello/katello/pull/3978

Comment 9 Corey Welton 2014-04-24 17:46:17 UTC
QE Verified in  Satellite-6.0.3-RHEL-6-20140423.1, we do not appear to be throwing errors anymore.

Comment 10 Bryan Kearney 2014-07-02 14:06:49 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.


Note You need to log in before you can comment on or make changes to this bug.