Fixed issue on endpoint objects/relationships/ to prevent exception
being thrown when transaction id passed to GET request is null
Issue-ID: AAI-1439
Change-Id: Ib2a77063391612851149174a8bcfe356135d06ce
Signed-off-by: Michael Reece <michaere@amdocs.com>
httpHeadersValidator.validateRequestHeaders(headers);
ChampTransaction transaction = tId == null ? null : champDataService.getTransaction(tId);
- if (transaction == null) {
+ if (tId != null && transaction == null) {
throw new ChampServiceException("No transaction found for transaction ID: " + tId, Status.BAD_REQUEST);
}
retrieved = champDataService.getRelationshipsByObject(oId, Optional.ofNullable(transaction));