← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14776: Minor

 

------------------------------------------------------------
revno: 14776
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-04-10 21:45:11 +0200
message:
  Minor
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java	2014-04-10 15:05:15 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java	2014-04-10 19:45:11 +0000
@@ -94,12 +94,9 @@
             violation = "Start and end date or at least one period must be specified";
         }
         
-        if ( params.getStartDate() != null && params.getEndDate() != null )
+        if ( params.getStartDate() != null && params.getEndDate() != null && params.getStartDate().after( params.getEndDate() ) )
         {
-            if ( params.getStartDate().after( params.getEndDate() ) )
-            {
-                violation = "Start date is after end date: " + params.getStartDate() + " - " + params.getEndDate();
-            }            
+            violation = "Start date is after end date: " + params.getStartDate() + " - " + params.getEndDate();
         }
 
         if ( params.getPage() != null && params.getPage() <= 0 )