[Lada-commits] [PATCH] fix set media_from_mediadesk

Wald Commits scm-commit at wald.intevation.org
Fri Sep 18 14:39:40 CEST 2015


# HG changeset patch
# User Michael Stanko <mstanko at bfs.de>
# Date 1442579745 -7200
# Node ID 1ed5e3692215911f0ff96ead5b32fd956f9ee8cc
# Parent  56f9add7c902cea5709c171700f422ceaec2f383
fix set media_from_mediadesk

diff -r 56f9add7c902 -r 1ed5e3692215 src/main/java/de/intevation/lada/rest/ProbeService.java
--- 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);
diff -r 56f9add7c902 -r 1ed5e3692215 src/main/webapp/WEB-INF/classes/log4j.properties
--- 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


More information about the Lada-commits mailing list