dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43641
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22127: minor, don't report CREATE errors if id == 0, means object is just a placeholder
------------------------------------------------------------
revno: 22127
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2016-03-03 13:00:45 +0700
message:
minor, don't report CREATE errors if id == 0, means object is just a placeholder
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/objectbundle/DefaultObjectBundleService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/objectbundle/DefaultObjectBundleService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/objectbundle/DefaultObjectBundleService.java 2016-03-03 05:13:32 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/objectbundle/DefaultObjectBundleService.java 2016-03-03 06:00:45 +0000
@@ -182,7 +182,7 @@
IdentifiableObject identifiableObject = iterator.next();
IdentifiableObject object = bundle.getPreheat().get( bundle.getPreheatIdentifier(), identifiableObject );
- if ( object != null )
+ if ( object != null && object.getId() > 0 )
{
objectBundleValidation.addErrorReport( klass, ErrorCode.E5000, bundle.getPreheatIdentifier(),
bundle.getPreheatIdentifier().getIdentifiersWithName( identifiableObject ) );