aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2019-01-25 09:42:37 +0100
committerromaingimbert <romain.gimbert@orange.com>2019-01-25 09:42:37 +0100
commitef8fea9dac61407f29850a34c19a1effd1d4a5b9 (patch)
tree8ed90ab939c3f280e555b9a7cec0f5dd6e7103c5 /src/main/java/org
parent69197a8abc78ee825d38908cd46690b3c150caa1 (diff)
force nbi generate id of serviceorder
-fix code -fix test Change-Id: Ie6d7802bed61935b5a675e720d060ee9d7e2c865 Issue-ID: EXTAPI-188 Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Diffstat (limited to 'src/main/java/org')
-rwxr-xr-xsrc/main/java/org/onap/nbi/apis/hub/HubResource.java2
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/service/ServiceOrderService.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/onap/nbi/apis/hub/HubResource.java b/src/main/java/org/onap/nbi/apis/hub/HubResource.java
index cccd0a8..d9ee2e5 100755
--- a/src/main/java/org/onap/nbi/apis/hub/HubResource.java
+++ b/src/main/java/org/onap/nbi/apis/hub/HubResource.java
@@ -62,7 +62,7 @@ public class HubResource extends ResourceManagement {
@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Subscriber> createEventSubscription(@RequestBody Subscription subscription) {
logger.debug("POST request for subscription : {}", subscription);
-
+ subscription.setId(null);
Subscriber subscriber = subscriptionService.createSubscription(subscription);
URI location = ServletUriComponentsBuilder
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/service/ServiceOrderService.java b/src/main/java/org/onap/nbi/apis/serviceorder/service/ServiceOrderService.java
index 47262e2..b851be8 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/service/ServiceOrderService.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/service/ServiceOrderService.java
@@ -59,6 +59,7 @@ public class ServiceOrderService {
public ServiceOrder createServiceOrder(ServiceOrder serviceOrder){
serviceOrder.setState(StateType.ACKNOWLEDGED);
serviceOrder.setOrderDate(new Date());
+ serviceOrder.setId(null);
for (ServiceOrderItem serviceOrderItem : serviceOrder.getOrderItem()) {
serviceOrderItem.setState(StateType.ACKNOWLEDGED);
}