Made Oracle backend cast CharField values of None to u'' instead of ''

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2007-09-14 23:23:55 +00:00
parent 92e55fe8b1
commit 8c5214d9b4
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ class DatabaseOperations(BaseDatabaseOperations):
# string instead of null, but only if the field accepts the # string instead of null, but only if the field accepts the
# empty string. # empty string.
if value is None and isinstance(field, Field) and field.empty_strings_allowed: if value is None and isinstance(field, Field) and field.empty_strings_allowed:
value = '' value = u''
# Convert 1 or 0 to True or False # Convert 1 or 0 to True or False
elif value in (1, 0) and isinstance(field, (BooleanField, NullBooleanField)): elif value in (1, 0) and isinstance(field, (BooleanField, NullBooleanField)):
value = bool(value) value = bool(value)