← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 16907
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 18:50:02 +0700
message:
  Minor fix
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.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/schema/Property.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java	2014-09-30 07:02:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java	2014-10-01 11:50:02 +0000
@@ -410,6 +410,11 @@
         this.writable = writable;
     }
 
+    public String key()
+    {
+        return isCollection() ? collectionName : name;
+    }
+
     @Override
     public int getOrder()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java	2014-10-01 10:14:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java	2014-10-01 11:50:02 +0000
@@ -335,14 +335,7 @@
                 {
                     if ( property.isPersisted() )
                     {
-                        if ( property.isCollection() )
-                        {
-                            fieldMap.put( property.getCollectionName(), new FieldMap() );
-                        }
-                        else
-                        {
-                            fieldMap.put( property.getName(), new FieldMap() );
-                        }
+                        fieldMap.put( property.key(), new FieldMap() );
                     }
                 }