summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java
index 5aedb4ee0e..edd3b936a2 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java
@@ -97,9 +97,6 @@ public class PolicyTypeImportManager {
if (result.isLeft()) {
for (String targetId : policyType.getTargets()) {
boolean isValid = toscaOperationFacade.getLatestByToscaResourceName(targetId).isLeft();
- if (!isValid) {
- isValid = groupOperation.isGroupExist(targetId, false);
- }
if (!isValid) { // check if it is a groupType
final Either<GroupTypeDefinition, StorageOperationStatus> groupTypeFound = groupTypeOperation
@@ -108,6 +105,10 @@ public class PolicyTypeImportManager {
}
if (!isValid) {
+ isValid = groupOperation.isGroupExist(targetId, false);
+ }
+
+ if (!isValid) {
ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.TARGETS_NON_VALID, policyType.getType(), targetId);
result = Either.right(responseFormat);
break;