[Mpuls-commits] r5520 - base/trunk/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 2 15:09:43 CET 2011


Author: torsten
Date: 2011-11-02 15:09:41 +0100 (Wed, 02 Nov 2011)
New Revision: 5520

Modified:
   base/trunk/mpulsweb/model/agencysettings.py
Log:
Added methods to get the remindercondition and its description per agency. If
no specific condition is configured take the default condition from json.


Modified: base/trunk/mpulsweb/model/agencysettings.py
===================================================================
--- base/trunk/mpulsweb/model/agencysettings.py	2011-11-02 11:52:05 UTC (rev 5519)
+++ base/trunk/mpulsweb/model/agencysettings.py	2011-11-02 14:09:41 UTC (rev 5520)
@@ -34,7 +34,7 @@
 
 import psycopg2.extras
 
-from mpulsweb.lib.base import render
+from mpulsweb.lib.base import render, g
 from mpulsweb.lib.db import db
 from mpulsweb.lib.helpers import ensure_unicode
 
@@ -112,6 +112,14 @@
     def getMaxSavetime(self):
         return self.conf.get('max_speicherdauer', u'')
 
+    def getReminderCondition(self):
+        default = g.mpuls_config.get('case', 'remindercondition')
+        return self.conf.get('remindercondition', '') or default
+
+    def getReminderConditionDesc(self):
+        default = g.mpuls_config.get('case', 'reminderconditiondesc')
+        return self.conf.get('reminderconditiondesc', '') or default
+
     def getPrivacyStatement(self):
         form = self.conf.get('ee_formular', '')
         if len(form) > 0:



More information about the Mpuls-commits mailing list