From d4c4d0e71df950ab8264fe2838b92fac88286070 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Thu, 8 Aug 2019 18:13:56 -0400 Subject: Default resolution status when storing result MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It can happen the resolve fails, and the status end up not being set, hence to avoid any exception, we default to failure. Change-Id: Ia5fb9ad954c109f394425f33c506e66d7e1969e4 Issue-ID: CCSDK-1606 Signed-off-by: Alexis de Talhouët --- .../functions/resource/resolution/db/ResourceResolutionDBService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt index 5335b14b1..e5a13a630 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt @@ -167,7 +167,7 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso resourceResolution.dictionaryName = resourceAssignment.dictionaryName resourceResolution.dictionaryVersion = resourceAssignment.version resourceResolution.dictionarySource = resourceAssignment.dictionarySource - resourceResolution.status = resourceAssignment.status + resourceResolution.status = resourceAssignment.status ?: BluePrintConstants.STATUS_FAILURE try { resourceResolutionRepository.saveAndFlush(resourceResolution) -- cgit 1.2.3-korg