From: Alexis de Talhouët Date: Thu, 8 Aug 2019 22:13:56 +0000 (-0400) Subject: Default resolution status when storing result X-Git-Tag: 0.5.2~4^2~3 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=d4c4d0e71df950ab8264fe2838b92fac88286070;p=ccsdk%2Fcds.git Default resolution status when storing result 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 --- 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)