← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7790: Minor fix relative periods

 

------------------------------------------------------------
revno: 7790
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-07-31 19:51:33 +0200
message:
  Minor fix relative periods
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.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/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-07-30 13:09:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-07-31 17:51:33 +0000
@@ -356,7 +356,7 @@
     {
         PeriodType periodType = null;
         
-        if ( periods != null )
+        if ( periods != null && !periods.isEmpty() )
         {            
             PeriodType lowestFrequencyOrder = periods.get( 0 ).getPeriodType();