Mercurial > lada > lada-server
changeset 1125:f9328849a53c
Avoid NPE on trying to delete non-existent Probe object.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 31 Oct 2016 17:14:49 +0100 |
parents | 960248dd98c3 |
children | 70b51893f15b |
files | src/main/java/de/intevation/lada/rest/ProbeService.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java Mon Oct 31 15:50:05 2016 +0100 +++ b/src/main/java/de/intevation/lada/rest/ProbeService.java Mon Oct 31 17:14:49 2016 +0100 @@ -498,6 +498,9 @@ /* Get the probe object by id*/ Response probe = repository.getById(Probe.class, Integer.valueOf(id), "land"); + if (!probe.getSuccess()) { + return probe; + } Probe probeObj = (Probe)probe.getData(); if (!authorization.isAuthorized( request,