aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java/org')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java
index 4b8249823e..f85e435e1c 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java
@@ -1792,6 +1792,10 @@ public class ToscaExportHandler {
ConstraintType.MAX_LENGTH.getType().equals(filterConstraint.getOperator().getType())) {
filterConstraint.setValue(Integer.valueOf(String.valueOf(filterConstraint.getValue())));
}
+ if (doesTypeNeedConvertingToBoolean(filterConstraint.getOriginalType())) {
+ filterConstraint.setValue(ToscaType.getToscaType(filterConstraint.getOriginalType()).convert(
+ String.valueOf(filterConstraint.getValue())));
+ }
return Map.of(filterConstraint.getOperator().getType(), filterConstraint.getValue());
}
@@ -1802,6 +1806,10 @@ public class ToscaExportHandler {
return ToscaType.INTEGER.getType().equals(propertyType) || ToscaType.FLOAT.getType().equals(propertyType);
}
+ private static boolean doesTypeNeedConvertingToBoolean(String propertyType) {
+ return ToscaType.BOOLEAN.getType().equals(propertyType);
+ }
+
private Map<String, String[]> buildSubstitutionMappingPropertyMapping(final Component component) {
if (component == null || CollectionUtils.isEmpty(component.getInputs())) {
return Collections.emptyMap();