Author: test
Date: 2006-04-21 09:22:27 -0600 (Fri, 21 Apr 2006)
New Revision: 1723

Modified:
   FormEncode/trunk/docs/news.txt
   FormEncode/trunk/formencode/compound.py
Log:
Fix for compound not_empty, from Alberto Valverde

Modified: FormEncode/trunk/docs/news.txt
===================================================================
--- FormEncode/trunk/docs/news.txt      2006-04-19 17:46:36 UTC (rev 1722)
+++ FormEncode/trunk/docs/news.txt      2006-04-21 15:22:27 UTC (rev 1723)
@@ -3,9 +3,15 @@
 
 .. contents::
 
-SVN trunk
----------
+0.5.1
+-----
 
+* Fixed compound validators and ``not_empty`` (was breaking
+  SQLObject's PickleCol)
+
+0.5
+---
+
 * Added ``htmlfill.default_formatter_dict``, and you can poke new
   formatters in there to effective register them.
 

Modified: FormEncode/trunk/formencode/compound.py
===================================================================
--- FormEncode/trunk/formencode/compound.py     2006-04-19 17:46:36 UTC (rev 
1722)
+++ FormEncode/trunk/formencode/compound.py     2006-04-21 15:22:27 UTC (rev 
1723)
@@ -90,7 +90,7 @@
     def not_empty__get(self):
         not_empty = True
         for validator in self.validators:
-            not_empty = not_empty and validator.not_empty
+            not_empty = not_empty and getattr(validator, 'not_empty', False)
         return not_empty
     not_empty = property(not_empty__get)
 
@@ -162,6 +162,6 @@
     def not_empty__get(self):
         not_empty = False
         for validator in self.validators:
-            not_empty = not_empty or validator.not_empty
+            not_empty = not_empty or getattr(validator, 'not_empty', False)
         return not_empty
     not_empty = property(not_empty__get)



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs

Reply via email to