← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5686: Allowing only aggregate domain type data elements in AggregatableDataElementFilter

 

------------------------------------------------------------
revno: 5686
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-01-10 21:00:20 +0100
message:
  Allowing only aggregate domain type data elements in AggregatableDataElementFilter
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java	2012-01-10 20:00:20 +0000
@@ -27,6 +27,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.dataelement.DataElement.DOMAIN_TYPE_AGGREGATE;
+
 import java.util.HashSet;
 import java.util.Set;
 
@@ -50,6 +52,6 @@
 
     public boolean retain( DataElement object )
     {
-        return object != null && types.contains( object.getType() );
+        return object != null && types.contains( object.getType() ) && DOMAIN_TYPE_AGGREGATE.equals( object.getDomainType() );
     }
 }