dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39729
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20139: Minor
------------------------------------------------------------
revno: 20139
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-14 19:35:36 +0200
message:
Minor
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.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/DataSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java 2015-09-03 03:11:47 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java 2015-09-14 17:35:36 +0000
@@ -179,9 +179,9 @@
throw new WebMessageException( WebMessageUtils.notFound( "DataSet not found for uid: " + uid ) );
}
- OrganisationUnit ou = null;
+ OrganisationUnit ou = manager.get( OrganisationUnit.class, orgUnit );
- if ( orgUnit != null && (ou = manager.get( OrganisationUnit.class, orgUnit )) == null )
+ if ( ou == null )
{
throw new WebMessageException( WebMessageUtils.notFound( "Organisation unit does not exist: " + orgUnit ) );
}
@@ -207,9 +207,9 @@
throw new WebMessageException( WebMessageUtils.notFound( "DataSet not found for uid: " + uid ) );
}
- OrganisationUnit ou = null;
+ OrganisationUnit ou = manager.get( OrganisationUnit.class, orgUnit );
- if ( orgUnit != null && (ou = manager.get( OrganisationUnit.class, orgUnit )) == null )
+ if ( ou == null )
{
throw new WebMessageException( WebMessageUtils.notFound( "Organisation unit does not exist: " + orgUnit ) );
}