From bc8d41974dfd8097e6296c9706883306d8dd013a Mon Sep 17 00:00:00 2001 From: Boulder Sprinters Date: Thu, 31 May 2007 18:55:16 +0000 Subject: [PATCH] boulder-oracle-sprint: Fixed #4440. git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5394 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/oracle/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index ff1dc0d299..48b3c27355 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -461,7 +461,7 @@ def get_query_set_class(DefaultQuerySet): def resolve_columns(self, row, fields=()): from django.db.models.fields import DateField, DateTimeField, \ - TimeField, BooleanField, NullBooleanField, DecimalField + TimeField, BooleanField, NullBooleanField, DecimalField, Field values = [] for value, field in map(None, row, fields): if isinstance(value, Database.LOB): @@ -470,7 +470,7 @@ def get_query_set_class(DefaultQuerySet): # order to adhere to the Django convention of using the empty # string instead of null, but only if the field accepts the # empty string. - if value is None and field.empty_strings_allowed: + if value is None and isinstance(field, Field) and field.empty_strings_allowed: value = '' # Convert 1 or 0 to True or False elif value in (1, 0) and isinstance(field, (BooleanField, NullBooleanField)):