← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15050: Minor

 

------------------------------------------------------------
revno: 15050
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-04-28 11:48:39 +0200
message:
  Minor
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.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-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java	2014-04-28 09:34:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java	2014-04-28 09:48:39 +0000
@@ -385,8 +385,6 @@
     {
         dataApprovalLevel.setLevel( index + 1 );
 
-        dataApprovalLevel.setCreated( new Date() );
-
         dataApprovalLevelStore.update( dataApprovalLevel );
     }
 
@@ -444,17 +442,17 @@
     private int requiredApprovalLevel( OrganisationUnit orgUnit )
     {
         int orgUnitLevel = orgUnit.getLevel() != 0 ?
-                orgUnit.getLevel() :
-                organisationUnitService.getLevelOfOrganisationUnit( orgUnit.getUid() );
+            orgUnit.getLevel() :
+            organisationUnitService.getLevelOfOrganisationUnit( orgUnit.getUid() );
 
         int required = APPROVAL_LEVEL_UNAPPROVED;
 
         for ( DataApprovalLevel level : getAllDataApprovalLevels() )
         {
             if ( level.getOrgUnitLevel() >= orgUnitLevel
-                    && securityService.canRead( level )
-                    && ( level.getCategoryOptionGroupSet() == null || canReadSomeCategory( level.getCategoryOptionGroupSet() ) )
-                    && level.getLevel() < getAllDataApprovalLevels().size() )
+                && securityService.canRead( level )
+                && ( level.getCategoryOptionGroupSet() == null || canReadSomeCategory( level.getCategoryOptionGroupSet() ) )
+                && level.getLevel() < getAllDataApprovalLevels().size() )
             {
                 required = level.getLevel() + 1;
                 break;
@@ -480,7 +478,7 @@
                 return true;
             }
         }
+        
         return false;
     }
-
 }