← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7620: bugfix: fixes db error when updating attributevalues with zero-length string

 

------------------------------------------------------------
revno: 7620
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-07-17 13:05:45 +0300
message:
  bugfix: fixes db error when updating attributevalues with zero-length string
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AttributeUtils.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AttributeUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AttributeUtils.java	2012-06-12 07:46:25 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AttributeUtils.java	2012-07-17 10:05:45 +0000
@@ -54,6 +54,8 @@
     public static void updateAttributeValuesFromJson( Set<AttributeValue> attributeValues,
         List<String> jsonAttributeValues, AttributeService attributeService )
     {
+        attributeValues.clear();
+
         for ( String jsonAttributeValue : jsonAttributeValues )
         {
             JSONObject json = JSONObject.fromObject( jsonAttributeValue );