dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22767
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11046: Analytics, fixed bug with validation
------------------------------------------------------------
revno: 11046
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-05-28 13:14:16 +0200
message:
Analytics, fixed bug with validation
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.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/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2013-05-27 19:46:30 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2013-05-28 11:14:16 +0000
@@ -42,6 +42,7 @@
import java.util.Collection;
import java.util.List;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.analytics.AggregationType;
@@ -153,7 +154,7 @@
{
for ( String column : columns )
{
- if ( !params.hasDimensionCollapseDx( column ) )
+ if ( !StringUtils.isEmpty( column ) && !params.hasDimensionCollapseDx( column ) )
{
violation = "Column must be present as dimension in query: " + column;
}
@@ -164,7 +165,7 @@
{
for ( String row : rows )
{
- if ( !params.hasDimensionCollapseDx( row ) )
+ if ( !StringUtils.isEmpty( row ) && !params.hasDimensionCollapseDx( row ) )
{
violation = "Row must be present as dimension in query: " + row;
}