Browse files

Don't return 500 on no found causativeAgents

  • Loading branch information...
1 parent 68a5d75 commit 561de985339b360989a61617a54c8318130fe5b9 @mwl mwl committed Sep 11, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 sc-web/src/main/java/dk/sst/snomedcave/controllers/DrugController.java
View
4 sc-web/src/main/java/dk/sst/snomedcave/controllers/DrugController.java
@@ -96,6 +96,10 @@ public boolean evaluate(ConceptRelation relation) {
}
}
+ if (causativesDrugAllergy.size() == 0) {
+ return new ResponseEntity<String>(HttpStatus.NOT_FOUND);
+ }
+
concept = conceptRepository.findOne(causativesDrugAllergy.get(0).getChild().getNodeId());
JsonObject response = new JsonObject();

0 comments on commit 561de98

Please sign in to comment.