diff options
author | Arthur Martella <am153x@att.com> | 2018-05-16 11:41:48 -0400 |
---|---|---|
committer | Arthur Martella <am153x@att.com> | 2018-05-16 11:41:48 -0400 |
commit | 04e02fd411de15ae23753c2cf71703c0bc9d06e3 (patch) | |
tree | afd89724418ff1ef38e843900303b26cf2916c61 /mso-api-handlers/mso-api-handler-infra/src/main/java | |
parent | d2e69c0d689596033a9c35aa98d37a44e2cc88cb (diff) |
Only set recipe when null in getServiceURI
Change-Id: I526d79d602d27c7c734bd1e38a4733176bd55f15
Issue-ID: SO-619
Signed-off-by: Arthur Martella <am153x@att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java index 9cba623642..e16963db3b 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java @@ -984,15 +984,15 @@ public class ServiceInstances { RequestParameters reqParam = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters(); if(reqParam!=null && reqParam.isaLaCarte()!=null && reqParam.isaLaCarte() && recipe==null){ return null; + } else if (recipe==null) { + //aLaCarte wasn't sent, so we'll try the default + serviceRecord = db.getServiceByModelName(defaultSourceServiceModelName); + if (serviceRecord == null) { + serviceRecord = db.getServiceByModelName(defaultServiceModelName); + } + recipe = db.getServiceRecipeByModelUUID(serviceRecord.getModelUUID(), action.name()); } - //aLaCarte wasn't sent, so we'll try the default - serviceRecord = db.getServiceByModelName(defaultSourceServiceModelName); - if (serviceRecord == null) { - serviceRecord = db.getServiceByModelName(defaultServiceModelName); - } - - recipe = db.getServiceRecipeByModelUUID(serviceRecord.getModelUUID(), action.name()); if(modelInfo.getModelVersionId() == null) { modelInfo.setModelVersionId(serviceRecord.getModelUUID()); } |