[Mpuls-commits] r5476 - base/trunk/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Oct 14 20:29:04 CEST 2011
Author: bh
Date: 2011-10-14 20:29:04 +0200 (Fri, 14 Oct 2011)
New Revision: 5476
Modified:
base/trunk/mpulsweb/lib/validators.py
Log:
Check that the start date preceeds the end date in case searches.
This is done with a DateOrder chained validator in SearchCaseForm so
that it applies to the EvaluationSearchCaseForm as well.
Modified: base/trunk/mpulsweb/lib/validators.py
===================================================================
--- base/trunk/mpulsweb/lib/validators.py 2011-10-14 18:24:22 UTC (rev 5475)
+++ base/trunk/mpulsweb/lib/validators.py 2011-10-14 18:29:04 UTC (rev 5476)
@@ -697,7 +697,9 @@
edate = MyDateConverter(if_missing=None, month_style='dd.mm.jjjj')
gender = Int(if_missing=-2)
+ chained_validators = [DateOrder('sdate', 'edate')]
+
class EvaluationSearchCaseForm(SearchCaseForm):
federal_state = ForEach(Int(), convert_to_list=True)
More information about the Mpuls-commits
mailing list