diff options
author | franciscovila <javier.paradela.vila@est.tech> | 2023-01-31 14:24:02 +0000 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2023-02-08 22:19:53 +0000 |
commit | c6cb16f234b8ae9de4aede3ca09a57e6ca177abe (patch) | |
tree | f14c9a73bb1f78a928b6a9d6ffe9cee289be947e /catalog-be/src/main/java/org | |
parent | 442784e34ef8cae76cca559a600f360dfdeee97e (diff) |
Constraints in data type view
Develop all necessary changes in the UI to allow managing data type constraints
Issue-ID: SDC-4331
Signed-off-by: franciscovila <javier.paradela.vila@est.tech>
Change-Id: I337438ba088e4f2f4978a1aff2408eda8157b892
Diffstat (limited to 'catalog-be/src/main/java/org')
-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); |