← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6486: minor changes to meta-data import/export, now works with constants (and idScheme, strategy etc is...

 

------------------------------------------------------------
revno: 6486
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-04-05 11:34:45 +0200
message:
  minor changes to meta-data import/export, now works with constants (and idScheme, strategy etc is also working)
modified:
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/ConstantImporter.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/ConstantImporter.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/ConstantImporter.java	2012-04-04 17:50:32 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/ConstantImporter.java	2012-04-05 09:34:45 +0000
@@ -61,14 +61,12 @@
     @Override
     protected ImportConflict updatedObject( Constant constant, Constant oldConstant, ImportOptions options )
     {
-        LOG.info( "UPDATED OBJECT: " + constant + ", OLD OBJECT: " + oldConstant );
-
-        mergeIdentifiableObject( constant, oldConstant );
+        oldConstant.setValue( constant.getValue() );
 
         if ( !options.isDryRun() )
         {
-            LOG.info( "Trying to update object with UID: " + constant.getUid() );
-            manager.update( constant );
+            LOG.info( "Trying to update object with UID: " + oldConstant.getUid() );
+            manager.update( oldConstant );
             LOG.info( "Update successful." );
         }