Update of /cvsroot/sqlobject/SQLObject/SQLObject/include
In directory sc8-pr-cvs1:/tmp/cvs-serv1915/SQLObject/include
Modified Files:
Validator.py
Log Message:
* Fixed validation -- fromPython and toPython were mixed up in places.
* Made sure validation/conversion happened everywhere it should.
* Fixed BoolCol to work like it should.
Index: Validator.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/include/Validator.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Validator.py 24 Sep 2003 12:18:15 -0000 1.2
--- Validator.py 26 Sep 2003 07:12:59 -0000 1.3
***************
*** 282,285 ****
--- 282,289 ----
return first.withValidator(validators)
else:
+ # Get rid of any None values in the list:
+ validators = filter(None, validators)
+ if not validators:
+ return first
return cls(first, *validators)
join = classmethod(join)
***************
*** 345,348 ****
--- 349,353 ----
'subclass': self.subclass},
value, state)
+ return value
def confirmInType(self, value, state):
***************
*** 352,355 ****
--- 357,361 ----
'typeList': ', '.join(map(repr, self.inType))},
value, state)
+ return value
def confirmType(self, value, state):
***************
*** 359,362 ****
--- 365,369 ----
'type': self.type},
value, state)
+ return value
class Wrapper(FancyValidator):
|