diff --git a/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java b/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java index d8fdb2ef294c7eb090aacaf7d6f17b3c54323971..2d751838e823c28d4143f0347a30e8e390469133 100644 --- a/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java +++ b/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java @@ -294,7 +294,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert validatedValue)); } } else { - String translatedValue = extendedETPT.translate(registrator, (String) valueOrNull); + String translatedValue = extendedETPT.translate(registrator, property.tryGetAsString()); final String validatedValue = propertyValueValidator.validatePropertyValue(propertyType, translatedValue); diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSampleTest.java b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSampleTest.java index 54f3d0736dd76a2573fe688fa0cab1e8d8366b42..342438c5c19417f510c3d1e49aa151992d7b220e 100644 --- a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSampleTest.java +++ b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSampleTest.java @@ -1514,7 +1514,7 @@ public class GetSampleTest extends AbstractSampleTest assertPropertyHistory(history.get(1), simplePropertyCode, originalSimplePropertyValue); assertPropertyHistory(history.get(2), systemPropertyCode, update1.getProperty(systemPropertyCode) + " [PLATE_GEOMETRY]", sample.getModificationDate(), null); - assertPropertyHistory(history.get(3), simplePropertyCode, update2.getProperty(simplePropertyCode), sample.getModificationDate(), null); + assertPropertyHistory(history.get(3), simplePropertyCode, (String)update2.getProperty(simplePropertyCode), sample.getModificationDate(), null); assertRelationshipHistory(history.get(4), creation.getSpaceId(), SampleRelationType.SPACE, sample.getRegistrationDate(), null); }