Hide Forgot
Description of problem: Api for listing products returns two ids per product. One of them is Active Record id, the second one is candlepin product id. curl -H Content-Type: application/json -H Accept: application/json -# -k -u admin:admin http://localhost:3000/api/organizations/ACME_Corporation/products [ { "last_sync": "2011-09-07T10:21:56+02:00", "name": "prod_a1", "created_at": "2011-09-07T08:21:28Z", "productContent": [ ], "provider_id": 7, "multiplier": 1, "attributes": [ ], "multiplier": 1, "updated_at": "2011-09-07T08:21:28Z", "sync_plan_id": 25, "id": 14, "provider_name": "prov_a1", "description": null, "sync_state": "not_synced", "id": "1315383688377" } ] Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. clean katello 2. add a product 3. list products in an organization via api Actual results: Returned json contains candlepin and activerecord id, both under key "id". Expected results: There should be only the candlepin product id. Additional info:
Fixed, added :exclude constraint in Product#serializable_hash commit 7eee0f4cbe040295d2e98ad6e29f34df2b2b2f93 Author: Tomas Strachota <tstrachota> Date: Mon Sep 12 12:10:51 2011 +0200 736716 - product api was returning 2 ids per product
# VERIFIED fixed. now there is one id (candlepin_id) is returning back: --- [ { "name": "bz1", "created_at": "2011-09-23T12:38:33Z", "productContent": [ ], "provider_id": 13, "attributes": [ ], "updated_at": "2011-09-23T12:38:33Z", "multiplier": 1, "sync_state": "finished", "sync_plan_id": 25, "id": "1316781513084", "provider_name": "bz1", "last_sync": "2011-09-23T08:42:38-04:00", "description": null } ] --- Checked against: katello-0.1.83-1.git.48.02111ba.fc15.noarch