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

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


Author: bh
Date: 2011-10-14 12:47:35 +0200 (Fri, 14 Oct 2011)
New Revision: 5471

Modified:
   base/trunk/mpulsweb/lib/validators.py
Log:
Validate the sdate and edate search parameters as date objects.
Use MyDateConverter with a german date style instead of the DateCheck
validator which only checks the date but doesn't convert it to date
objects.

This commit implicitly changes how the dates are encoded in the SQL
query used by the case search. Before the change they used the german
date format, now they use iso format. This should work for all mpuls
databases.


Modified: base/trunk/mpulsweb/lib/validators.py
===================================================================
--- base/trunk/mpulsweb/lib/validators.py	2011-10-14 10:28:06 UTC (rev 5470)
+++ base/trunk/mpulsweb/lib/validators.py	2011-10-14 10:47:35 UTC (rev 5471)
@@ -693,8 +693,8 @@
     standin = Int(if_missing=0)
     editor = Int(if_missing=-1)
     phase = ForEach(Int(), convert_to_list=True)
-    sdate = DateCheck(if_missing=None)
-    edate = DateCheck(if_missing=None)
+    sdate = MyDateConverter(if_missing=None, month_style='dd.mm.jjjj')
+    edate = MyDateConverter(if_missing=None, month_style='dd.mm.jjjj')
     gender = Int(if_missing=-2)
 
 



More information about the Mpuls-commits mailing list