[Mpuls-commits] r5470 - base/trunk/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 14 12:28:06 CEST 2011


Author: bh
Date: 2011-10-14 12:28:06 +0200 (Fri, 14 Oct 2011)
New Revision: 5470

Modified:
   base/trunk/mpulsweb/lib/config.py
Log:
Do not set defaults for the sdate and edate search parameters.

It would be better for these parameters to be date objects because that
would make it easier to perform additionaly validation, such as checking
the order of the dates. The values are currently strings, because
there's currently no way to have date objects in the JSON file with the
application specific configuration (at least that's probably one of the
reasons). Removing the possibility to set them in the JSON file is the
easiest way to enable the transition to date objects. 

No application currently sets them in their JSON file, so the removal
should not affect any existing application. If, in the future, it turns
out that it will be necessary to set them, it shouldn't be difficult to
find a way to do that.


Modified: base/trunk/mpulsweb/lib/config.py
===================================================================
--- base/trunk/mpulsweb/lib/config.py	2011-10-14 09:59:45 UTC (rev 5469)
+++ base/trunk/mpulsweb/lib/config.py	2011-10-14 10:28:06 UTC (rev 5470)
@@ -364,8 +364,6 @@
                 'state': [3, 4],
                 'phase': [-1],
                 'federal_state': [0, 1],
-                'sdate': '',
-                'edate': ''
                 }
             ]
         set('search', 'admin_defaults', search_admin_default)
@@ -380,8 +378,6 @@
                 'state': [1],
                 'phase': [-1],
                 'federal_state': [0, 1],
-                'sdate': '',
-                'edate': ''
                 }
             ]
         set('search', 'cm_defaults', search_cm_default)



More information about the Mpuls-commits mailing list