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

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 22 11:26:01 CET 2012


Author: roland
Date: 2012-02-22 11:26:01 +0100 (Wed, 22 Feb 2012)
New Revision: 5823

Modified:
   base/trunk/mpulsweb/lib/validators.py
Log:
Check for 'ref' before proceeding
Under some circumstances ref will be None and the comparison with a date
object will fail. This fixes a bug in the extended search when only an end
date was given.


Modified: base/trunk/mpulsweb/lib/validators.py
===================================================================
--- base/trunk/mpulsweb/lib/validators.py	2012-02-21 10:11:30 UTC (rev 5822)
+++ base/trunk/mpulsweb/lib/validators.py	2012-02-22 10:26:01 UTC (rev 5823)
@@ -222,7 +222,7 @@
             # chained validator
             if field == '':
                 field = ref
-            if field and field < ref:
+            if field and ref and field < ref:
                 errors[name] = self.message('notbefore', state)
         if errors:
             error_list = errors.items()



More information about the Mpuls-commits mailing list