← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5932: Minor fix.

 

------------------------------------------------------------
revno: 5932
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-02-13 13:29:31 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lockexception/AddLockExceptionAction.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-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lockexception/AddLockExceptionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lockexception/AddLockExceptionAction.java	2012-02-13 06:21:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lockexception/AddLockExceptionAction.java	2012-02-13 06:29:31 +0000
@@ -108,13 +108,19 @@
             return INPUT;
         }
 
+        DataSet dataSet = dataSetService.getDataSet( dataSetId );
+        Period period = periodService.getPeriodByExternalId( periodId );
+
+        if ( dataSet == null || period == null )
+        {
+            return ERROR;
+        }
+
         for ( String id : organisationUnitId.split( "," ) )
         {
             OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( id ) );
-            DataSet dataSet = dataSetService.getDataSet( dataSetId );
-            Period period = periodService.getPeriodByExternalId( periodId );
 
-            if ( organisationUnit == null || dataSet == null || period == null )
+            if ( organisationUnit == null )
             {
                 return ERROR;
             }