← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14554: minor

 

------------------------------------------------------------
revno: 14554
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-31 14:48:27 +0700
message:
  minor
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.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/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2014-03-31 06:42:29 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2014-03-31 07:48:27 +0000
@@ -270,12 +270,7 @@
 
         OrganisationUnit organisationUnit = null;
 
-        if ( IdentifiableObject.IdentifiableProperty.ID.equals( importOptions.getOrgUnitIdScheme() ) ||
-            IdentifiableObject.IdentifiableProperty.UID.equals( importOptions.getOrgUnitIdScheme() ) )
-        {
-            organisationUnit = organisationUnitService.getOrganisationUnit( event.getOrgUnit() );
-        }
-        else if ( IdentifiableObject.IdentifiableProperty.UUID.equals( importOptions.getOrgUnitIdScheme() ) )
+        if ( IdentifiableObject.IdentifiableProperty.UUID.equals( importOptions.getOrgUnitIdScheme() ) )
         {
             organisationUnit = organisationUnitService.getOrganisationUnitByUuid( event.getOrgUnit() );
         }
@@ -292,6 +287,10 @@
                 organisationUnit = organisationUnitByName.get( 0 );
             }
         }
+        else
+        {
+            organisationUnit = organisationUnitService.getOrganisationUnit( event.getOrgUnit() );
+        }
 
         if ( organisationUnit == null )
         {