diff options
Diffstat (limited to 'catalog-be')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DataTypeServlet.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DataTypeServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DataTypeServlet.java index 2e67a9bb47..0f6257157c 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DataTypeServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DataTypeServlet.java @@ -62,6 +62,7 @@ import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.log.enums.EcompLoggerErrorCode; import org.openecomp.sdc.common.log.wrappers.Logger; import org.springframework.stereotype.Controller; +import org.apache.commons.lang3.StringUtils; @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog/data-types") @@ -159,6 +160,9 @@ public class DataTypeServlet extends BeGenericServlet { throw new OperationException(ActionStatus.INVALID_MODEL, String.format("Property model is not the same as the data type model. Must be '%s'", model)); } + if (StringUtils.isEmpty(dataType.getModel())) { + dataType.setModel("SDC AID"); + } final PropertyDefinitionDto property = dataTypeOperation.createProperty(id, propertyDefinitionDto); dataTypeOperation.addPropertyToAdditionalTypeDataType(dataType, property); dataTypeBusinessLogic.updateApplicationDataTypeCache(id); |