dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20951
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9796: DVS: support uuid orgUnitScheme
------------------------------------------------------------
revno: 9796
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-02-13 07:57:36 +0700
message:
DVS: support uuid orgUnitScheme
modified:
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2013-02-13 00:45:31 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2013-02-13 00:57:36 +0000
@@ -260,7 +260,16 @@
Period outerPeriod = PeriodType.getPeriodFromIsoString( dataValueSet.getPeriod() );
- OrganisationUnit outerOrgUnit = dataValueSet.getOrgUnit() != null ? identifiableObjectManager.getObject( OrganisationUnit.class, orgUnitIdScheme, dataValueSet.getOrgUnit() ) : null;
+ OrganisationUnit outerOrgUnit;
+
+ if ( orgUnitIdScheme.equals( IdentifiableProperty.UUID ) )
+ {
+ outerOrgUnit = dataValueSet.getOrgUnit() == null ? null : organisationUnitService.getOrganisationUnitByUuid( dataValueSet.getOrgUnit() );
+ }
+ else
+ {
+ outerOrgUnit = dataValueSet.getOrgUnit() != null ? identifiableObjectManager.getObject( OrganisationUnit.class, orgUnitIdScheme, dataValueSet.getOrgUnit() ) : null;
+ }
if ( dataSet != null && completeDate != null )
{