------------------------------------------------------------
revno: 20139
committer: Lars Helge Overland <larshe...@gmail.com>
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 ) );
         }

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to