Bug 786646 - REST Interface - Snapshot Topic creation returns the wrong ID
Summary: REST Interface - Snapshot Topic creation returns the wrong ID
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: REST-API
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Matthew Casperson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-02 02:07 UTC by Lee Newson
Modified: 2014-08-04 22:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-02 21:44:09 UTC


Attachments (Terms of Use)

Description Lee Newson 2012-02-02 02:07:43 UTC
When creating a SnapshotTopic the ID that is returned is the TopicID that was sent. The problem lies in the SnapshotTopicV1Factory.createRESTEntityFromDBEntity.

Currently it sets the id as:
retValue.setId(entity.getTopicId());

However it should set the SnapshotTopic ID and not the TopicID:
retValue.setId(entity.getId());

Comment 1 Matthew Casperson 2012-02-02 21:44:09 UTC
Fixed.


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