← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19771: use setAutoFields in OU constructor, needed to make getPath behave properly

 

------------------------------------------------------------
revno: 19771
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-08-17 10:03:40 +0700
message:
  use setAutoFields in OU constructor, needed to make getPath behave properly
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.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-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-08-03 10:21:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-08-17 03:03:40 +0000
@@ -166,11 +166,12 @@
 
     public OrganisationUnit()
     {
-
+        setAutoFields(); // to have getPath working properly, we need to set auto fields (for uid etc)
     }
 
     public OrganisationUnit( String name )
     {
+        this();
         this.name = name;
     }