From 04e02fd411de15ae23753c2cf71703c0bc9d06e3 Mon Sep 17 00:00:00 2001 From: Arthur Martella Date: Wed, 16 May 2018 11:41:48 -0400 Subject: Only set recipe when null in getServiceURI Change-Id: I526d79d602d27c7c734bd1e38a4733176bd55f15 Issue-ID: SO-619 Signed-off-by: Arthur Martella --- .../openecomp/mso/apihandlerinfra/ServiceInstances.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mso-api-handlers') 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()); } -- cgit 1.2.3-korg