Permalink
Browse files

Don't check for 'not value' in base to_python. Messes up on cgi.Field…

…Storage.
  • Loading branch information...
ralphbean committed May 18, 2012
1 parent 949f991 commit 204e20fbdec27672547f26b19f0fc3eccbee3df0
Showing with 1 addition and 1 deletion.
  1. +1 −1 tw2/core/validation.py
@@ -190,7 +190,7 @@ def __init__(self, **kw):
setattr(self, k, kw[k])
def to_python(self, value):
if self.required and (value is None or not value):
if self.required and value is None:
raise ValidationError('required', self)
if isinstance(value, basestring) and self.strip:
value = value.strip()

0 comments on commit 204e20f

Please sign in to comment.