From 658fdb31531babc9be8342b483bbaf8c741bf4f4 Mon Sep 17 00:00:00 2001 From: buczekp <buczekp> Date: Wed, 26 May 2010 18:00:01 +0000 Subject: [PATCH] bugfix: couldn't assign mandatory property without initial value even if no entities existed SVN: 16129 --- .../business/bo/EntityTypePropertyTypeBO.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java index 8dd175bdbac..4c322e29346 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java @@ -141,19 +141,19 @@ public class EntityTypePropertyTypeBO extends AbstractBusinessObject implements throw new UserFailureException(String.format(errorMsgTemplate, size, entityKind .getLabel(), createPlural(size), entityType.getCode())); } - } - PersonPE registrator = findRegistrator(); - String validatedValue = - propertiesConverter.tryCreateValidatedPropertyValue(propertyType, assignment, - defaultValue); - for (IEntityPropertiesHolder entity : entities) - { - final EntityPropertyPE property = - propertiesConverter.createValidatedProperty(propertyType, assignment, - registrator, validatedValue); - if (property != null) + PersonPE registrator = findRegistrator(); + String validatedValue = + propertiesConverter.tryCreateValidatedPropertyValue(propertyType, assignment, + defaultValue); + for (IEntityPropertiesHolder entity : entities) { - entity.addProperty(property); + final EntityPropertyPE property = + propertiesConverter.createValidatedProperty(propertyType, assignment, + registrator, validatedValue); + if (property != null) + { + entity.addProperty(property); + } } } } -- GitLab