Browse files

Modified to_python method for BooleanField so that the to_python(str(…

…bool_val)) round trip works. This was causing problems with the serializers.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e6e6633 commit 59bf8dd3108fc1124d0bd843f7146595a0b0228f @freakboy3742 freakboy3742 committed Jul 19, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/fields/
@@ -364,8 +364,8 @@ def __init__(self, *args, **kwargs):
def to_python(self, value):
if value in (True, False): return value
- if value is 't': return True
- if value is 'f': return False
+ if value is 't' or value is 'True': return True
+ if value is 'f' or value is 'False': return False
raise validators.ValidationError, gettext("This value must be either True or False.")
def get_manipulator_field_objs(self):

0 comments on commit 59bf8dd

Please sign in to comment.