------------------------------------------------------------
revno: 17897
committer: Morten Olav Hansen <[email protected]>
branch nick: dhis2
timestamp: Wed 2015-01-07 11:25:08 +0700
message:
  minor bugfix, removed produces in deleteCompleteDataSetRegistration mapping, 
causes the client to have to set Accept: text/plain for delete to work (and we 
are not returning anything)
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.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/CompleteDataSetRegistrationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java	2015-01-02 13:41:19 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java	2015-01-07 04:25:08 +0000
@@ -61,6 +61,7 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.client.HttpClientErrorException;
 
 import javax.servlet.http.HttpServletRequest;
@@ -433,7 +434,7 @@
         registrationService.saveCompleteDataSetRegistrations( registrations, true );
     }
 
-    @RequestMapping( method = RequestMethod.DELETE, produces = "text/plain" )
+    @RequestMapping( method = RequestMethod.DELETE )
     public void deleteCompleteDataSetRegistration(
         @RequestParam Set<String> ds,
         @RequestParam String pe,
@@ -488,8 +489,7 @@
 
         if ( lockedDataSets.size() != 0 )
         {
-            ContextUtils
-                .conflictResponse( response, "Locked Data set(s) : " + StringUtils.join( lockedDataSets, ", " ) );
+            ContextUtils.conflictResponse( response, "Locked Data set(s) : " + StringUtils.join( lockedDataSets, ", " ) );
             return;
         }
 
@@ -499,13 +499,13 @@
 
         Set<OrganisationUnit> orgUnits = new HashSet<>();
         orgUnits.add( organisationUnit );
+
         if ( multiOu )
         {
             orgUnits.addAll( organisationUnit.getChildren() );
         }
 
         unRegisterCompleteDataSet( dataSets, period, orgUnits, attributeOptionCombo );
-
     }
 
     // -------------------------------------------------------------------------

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to