dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43224
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21951: Special workaround for DataElementOperands and field filtering
------------------------------------------------------------
revno: 21951
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-02-12 11:35:40 +0700
message:
Special workaround for DataElementOperands and field filtering
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.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-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java 2016-01-12 07:09:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java 2016-02-12 04:35:40 +0000
@@ -32,6 +32,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
+import org.hisp.dhis.dataelement.DataElementOperand;
import org.hisp.dhis.node.AbstractNode;
import org.hisp.dhis.node.Node;
import org.hisp.dhis.node.NodePropertyConverter;
@@ -229,7 +230,7 @@
child = new CollectionNode( property.getCollectionName() );
child.setNamespace( property.getNamespace() );
- if ( property.isIdentifiableObject() )
+ if ( property.isIdentifiableObject() && !DataElementOperand.class.isAssignableFrom( property.getItemKlass() ) )
{
for ( Object collectionObject : collection )
{
@@ -262,7 +263,7 @@
}
}
}
- else if ( property.isIdentifiableObject() )
+ else if ( property.isIdentifiableObject() && !DataElementOperand.class.isAssignableFrom( property.getKlass() ) )
{
child = getProperties( property, returnValue, fields );
}
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2016-02-11 09:27:02 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2016-02-12 04:35:40 +0000
@@ -48,8 +48,6 @@
import org.hisp.dhis.dxf2.importsummary.ImportStatus;
import org.hisp.dhis.dxf2.metadata.ImportService;
import org.hisp.dhis.dxf2.metadata.ImportTypeSummary;
-import org.hisp.dhis.render.DefaultRenderService;
-import org.hisp.dhis.render.RenderService;
import org.hisp.dhis.dxf2.webmessage.WebMessageException;
import org.hisp.dhis.fieldfilter.FieldFilterService;
import org.hisp.dhis.hibernate.exception.CreateAccessDeniedException;
@@ -70,6 +68,8 @@
import org.hisp.dhis.query.Query;
import org.hisp.dhis.query.QueryParserException;
import org.hisp.dhis.query.QueryService;
+import org.hisp.dhis.render.DefaultRenderService;
+import org.hisp.dhis.render.RenderService;
import org.hisp.dhis.schema.Property;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaService;