← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17428: proper fix for period issues, don't set any autofields on Period class (it is not persisted anyways)

 

------------------------------------------------------------
revno: 17428
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-11-11 17:31:59 +0545
message:
  proper fix for period issues, don't set any autofields on Period class (it is not persisted anyways)
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Period.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/period/Period.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Period.java	2014-11-11 11:19:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Period.java	2014-11-11 11:46:59 +0000
@@ -119,10 +119,16 @@
     // Logic
     // -------------------------------------------------------------------------
 
+
+    @Override
+    public void setAutoFields()
+    {
+    }
+
     @Override
     public String getUid()
     {
-        return getIsoDate();
+        return uid != null ? uid : getIsoDate();
     }
 
     public String getRealUid()