comparison src/main/java/de/intevation/lada/rest/ProbeService.java @ 949:2c927b3edb97

Return correct response if update failed.
author Tom Gottfried <tom@intevation.de>
date Tue, 24 May 2016 11:46:17 +0200
parents 48ca912c571e
children 1c41c7b8f7c2 0a44ab47d3d5
comparison
equal deleted inserted replaced
948:c9b84bca3e3d 949:2c927b3edb97
444 } 444 }
445 if (probe.getUmwId() == null || probe.getUmwId() == "") { 445 if (probe.getUmwId() == null || probe.getUmwId() == "") {
446 factory.findUmweltId(probe); 446 factory.findUmweltId(probe);
447 } 447 }
448 Response response = repository.update(probe, "land"); 448 Response response = repository.update(probe, "land");
449 if (!response.getSuccess()) {
450 return response;
451 }
449 Response updated = repository.getById( 452 Response updated = repository.getById(
450 LProbe.class, 453 LProbe.class,
451 ((LProbe)response.getData()).getId(), "land"); 454 ((LProbe)response.getData()).getId(), "land");
452 if (violation.hasWarnings()) { 455 if (violation.hasWarnings()) {
453 updated.setWarnings(violation.getWarnings()); 456 updated.setWarnings(violation.getWarnings());
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)