=== 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 ) ); }