summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2022-03-23 09:50:46 +0000
committerGerrit Code Review <gerrit@onap.org>2022-03-23 09:50:46 +0000
commit846d86dea4f60f6cb2596ce5ec6d877fe4ac9b76 (patch)
tree32cf034b04d9cb59da2f32ab391b11b89c97ebfa /main
parent88a8b0cfc60bf640015ab3339a065b6254be6ea9 (diff)
parentb66daa5aa2d3fa3645f579bfd7a69ccf5a48be2f (diff)
Merge "Fix spring transaction issue in getNodetemplates"
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/api/main/service/ToscaServiceTemplateService.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/src/main/java/org/onap/policy/api/main/service/ToscaServiceTemplateService.java b/main/src/main/java/org/onap/policy/api/main/service/ToscaServiceTemplateService.java
index d578d0dc..2e8fc9eb 100644
--- a/main/src/main/java/org/onap/policy/api/main/service/ToscaServiceTemplateService.java
+++ b/main/src/main/java/org/onap/policy/api/main/service/ToscaServiceTemplateService.java
@@ -550,14 +550,13 @@ public class ToscaServiceTemplateService {
throws PfModelException {
LOGGER.debug("->getNodeTemplate: name={}, version={}", name, version);
List<ToscaNodeTemplate> nodeTemplates = new ArrayList<>();
- var jpaNodeTemplates = new JpaToscaNodeTemplates();
var dbServiceTemplate = getDefaultJpaToscaServiceTemplate();
//Return empty if no nodeTemplates present in db
if (!ToscaUtils.doNodeTemplatesExist(dbServiceTemplate)) {
return nodeTemplates;
}
- jpaNodeTemplates = dbServiceTemplate.getTopologyTemplate().getNodeTemplates();
+ var jpaNodeTemplates = new JpaToscaNodeTemplates(dbServiceTemplate.getTopologyTemplate().getNodeTemplates());
//Filter specific nodeTemplates
if (name != null && version != null) {