dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40294
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20410: use DateUtils.parseDate to check for date validity in TEAService.validateValueType
------------------------------------------------------------
revno: 20410
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-30 13:41:12 +0700
message:
use DateUtils.parseDate to check for date validity in TEAService.validateValueType
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java 2015-09-30 06:22:47 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java 2015-09-30 06:41:12 +0000
@@ -254,7 +254,7 @@
{
return "Value is not boolean for attribute " + trackedEntityAttribute.getUid();
}
- else if ( ValueType.DATE == valueType && !DateUtils.dateIsValid( value ) )
+ else if ( ValueType.DATE == valueType && DateUtils.parseDate( value ) == null )
{
return "Value is not date for attribute " + trackedEntityAttribute.getUid();
}