changeset 738:1ed5e3692215

fix set media_from_mediadesk
author Michael Stanko <mstanko@bfs.de>
date Fri, 18 Sep 2015 14:35:45 +0200 (2015-09-18)
parents 56f9add7c902
children add3e994b4c4
files src/main/java/de/intevation/lada/rest/ProbeService.java src/main/webapp/WEB-INF/classes/log4j.properties
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java	Mon Sep 14 11:20:32 2015 +0200
+++ b/src/main/java/de/intevation/lada/rest/ProbeService.java	Fri Sep 18 14:35:45 2015 +0200
@@ -340,9 +340,7 @@
         if (probe.getUmwId() == null || probe.getUmwId().equals("")) {
             probe = factory.findUmweltId(probe);
         }
-        if (probe.getMediaDesk() != null || probe.getMediaDesk().length() > 0) {
-            probe = factory.findMediaDesk(probe);
-        }
+        probe = factory.findMediaDesk(probe);
         /* Persist the new probe object*/
         Response newProbe = defaultRepo.create(probe, "land");
         LProbe ret = (LProbe)newProbe.getData();
@@ -452,6 +450,7 @@
         if (lock.isLocked(probe)) {
             return new Response(false, 697, null);
         }
+        probe = factory.findMediaDesk(probe);
         Violation violation = validator.validate(probe);
         if (violation.hasErrors()) {
             Response response = new Response(false, 604, null);
--- a/src/main/webapp/WEB-INF/classes/log4j.properties	Mon Sep 14 11:20:32 2015 +0200
+++ b/src/main/webapp/WEB-INF/classes/log4j.properties	Fri Sep 18 14:35:45 2015 +0200
@@ -3,7 +3,7 @@
 log4j.logger.org.openid4java=WARN
 log4j.logger.org.hibernate=ERROR
 log4j.appender.lada=org.apache.log4j.RollingFileAppender
-log4j.appender.lada.File=../log/lada-server.log
+log4j.appender.lada.File=/var/log/wildfly/lada-server.log
 log4j.appender.lada.MaxFileSize=1MB
 log4j.appender.lada.MaxBackupIndex=5
 log4j.appender.lada.layout=org.apache.log4j.PatternLayout
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)