← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18103: minor fix, check for idobject for collection, not pr object

 

------------------------------------------------------------
revno: 18103
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-01-22 18:43:31 +0700
message:
  minor fix, check for idobject for collection, not pr object
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.java	2015-01-21 10:59:38 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.java	2015-01-22 11:43:31 +0000
@@ -133,7 +133,7 @@
 
         for ( Property property : schema.getProperties() )
         {
-            if ( !property.isCollection() )
+            if ( !property.isCollection() || !property.isIdentifiableObject() )
             {
                 continue;
             }
@@ -144,11 +144,6 @@
 
             for ( Object object : collection )
             {
-                if ( !IdentifiableObject.class.isInstance( object ) )
-                {
-                    continue;
-                }
-
                 List<ValidationViolation> validationViolations = schemaValidator.validate( object );
 
                 if ( !validationViolations.isEmpty() )