From fc2978cc45f0fe6d596e7043dc41f4a0b56613bb Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Thu, 28 Aug 2008 21:23:21 +0000 Subject: [PATCH] Fixed a bug in `NullBooleanField.to_python`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8684 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 26f83158b8..d4f3c6f344 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -687,7 +687,7 @@ class NullBooleanField(Field): def to_python(self, value): if value in (None, True, False): return value - if value in ('None'): return None + if value in ('None',): return None if value in ('t', 'True', '1'): return True if value in ('f', 'False', '0'): return False raise exceptions.ValidationError(