← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17205: minor fix

 

------------------------------------------------------------
revno: 17205
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-22 14:40:37 +0700
message:
  minor fix
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.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/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2014-10-22 07:36:17 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2014-10-22 07:40:37 +0000
@@ -583,8 +583,8 @@
             throw new DeleteAccessDeniedException( "You don't have the proper permissions to delete this object." );
         }
 
+        manager.update( objects.get( 0 ) );
         sessionFactory.getCurrentSession().refresh( candidate  );
-        manager.update( objects.get( 0 ) );
     }
 
     @RequestMapping( value = "/{uid}/{property}/{itemId}", method = RequestMethod.DELETE )
@@ -652,8 +652,8 @@
             throw new DeleteAccessDeniedException( "You don't have the proper permissions to delete this object." );
         }
 
+        manager.update( objects.get( 0 ) );
         sessionFactory.getCurrentSession().refresh( candidate  );
-        manager.update( objects.get( 0 ) );
     }
 
     //--------------------------------------------------------------------------