=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2013-10-03 14:24:37 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2013-11-12 15:04:52 +0000 @@ -247,6 +247,14 @@ @PathVariable( "uid" ) String uid, @RequestBody String text, HttpServletResponse response ) { + Interpretation interpretation = interpretationService.getInterpretation( uid ); + + if ( interpretation == null ) + { + ContextUtils.conflictResponse( response, "Interpretation does not exist: " + uid ); + return; + } + interpretationService.addInterpretationComment( uid, text ); ContextUtils.createdResponse( response, "Commented created", InterpretationController.RESOURCE_PATH + "/" + uid );