dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38485
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19601: minor fix
------------------------------------------------------------
revno: 19601
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-07-09 14:25:02 +0700
message:
minor fix
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.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/InterpretationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.java 2015-07-09 07:24:22 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.java 2015-07-09 07:25:02 +0000
@@ -50,7 +50,6 @@
import org.hisp.dhis.schema.descriptors.InterpretationSchemaDescriptor;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.user.User;
-import org.hisp.dhis.webapi.utils.ContextUtils;
import org.hisp.dhis.webapi.utils.WebMessageUtils;
import org.hisp.dhis.webapi.webdomain.WebMetaData;
import org.hisp.dhis.webapi.webdomain.WebOptions;
@@ -319,14 +318,13 @@
@RequestMapping( value = "/{uid}/comments/{cuid}", method = RequestMethod.PUT )
public void updateComment( @PathVariable( "uid" ) String uid, @PathVariable( "cuid" ) String cuid, HttpServletResponse response,
- @RequestBody String content )
+ @RequestBody String content ) throws WebMessageException
{
Interpretation interpretation = interpretationService.getInterpretation( uid );
if ( interpretation == null )
{
- ContextUtils.conflictResponse( response, "Interpretation does not exist: " + uid );
- return;
+ throw new WebMessageException( WebMessageUtils.conflict( "Interpretation does not exist: " + uid ) );
}
for ( InterpretationComment comment : interpretation.getComments() )