aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-dao/src
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-05-05 18:07:31 +0100
committerMichaelMorris <michael.morris@est.tech>2022-05-05 18:09:14 +0100
commit6140bdb1768134828d68d02c392c0cade6739d3b (patch)
tree93d13ab970e54bc125524f10b3397d2562c0fe2b /catalog-dao/src
parentb0943317bf995e0d7128b3ab829babdfbcef5a6e (diff)
Fix additional_types file being deleted
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3989 Change-Id: I6b22be3890d1e80b564ec66ab08ea7fe5f36bbe6
Diffstat (limited to 'catalog-dao/src')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/ToscaModelImportCassandraDao.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/ToscaModelImportCassandraDao.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/ToscaModelImportCassandraDao.java
index d21b561094..7c0cba5fa1 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/ToscaModelImportCassandraDao.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/ToscaModelImportCassandraDao.java
@@ -20,6 +20,7 @@
package org.openecomp.sdc.be.dao.cassandra;
import static java.util.function.Predicate.not;
+import static org.openecomp.sdc.common.api.Constants.ADDITIONAL_TYPE_DEFINITIONS;
import com.datastax.driver.core.Session;
import com.datastax.driver.mapping.Mapper;
@@ -98,6 +99,7 @@ public class ToscaModelImportCassandraDao extends CassandraDao {
final List<ToscaImportByModel> actualImportOfModelList = toscaImportByModelAccessor.findAllByModel(modelId).all();
final List<ToscaImportByModel> removedImportList = actualImportOfModelList.stream()
.filter(not(importOfModelList::contains))
+ .filter(not(toscaImport -> ADDITIONAL_TYPE_DEFINITIONS.equals(toscaImport.getFullPath())))
.collect(Collectors.toList());
importOfModelList.forEach(toscaImportByModelMapper::save);