dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17928
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7338: quickfix
------------------------------------------------------------
revno: 7338
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-06-20 22:39:28 +0300
message:
quickfix
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.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/organisationunit/DefaultOrganisationUnitService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java 2012-06-20 19:38:02 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java 2012-06-20 19:39:28 +0000
@@ -96,6 +96,8 @@
@Override
public int addOrganisationUnit( OrganisationUnit organisationUnit )
{
+ int id = organisationUnitStore.save( organisationUnit );
+
if(organisationUnit.getParent() == null)
{
// we are adding a new root node, add this node to the current user
@@ -103,8 +105,6 @@
currentUserService.getCurrentUser().getOrganisationUnits().add( organisationUnit );
}
- int id = organisationUnitStore.save( organisationUnit );
-
log.info( AuditLogUtil.logMessage( currentUserService.getCurrentUsername(), AuditLogUtil.ACTION_ADD,
OrganisationUnit.class.getSimpleName(), organisationUnit.getName() ) );