summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-06-05 01:05:44 +0000
committerBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-06-05 01:05:44 +0000
commit0248dfd3757e485bf80dcd1befb90e7a283fbb7f (patch)
treee73f90e87fec001851f802402fec9da5cc5dd9f5
parent2e7702c7454672830c3493a12d0efb3520919a7a (diff)
downloaddjango-0248dfd3757e485bf80dcd1befb90e7a283fbb7f.tar.gz
boulder-oracle-sprint: Added an ugly hack so that Oracle returns a default Field value of "" instead of None as appropriate.
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/db/models/fields/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index f3b4b2c1fb..61ae393bf6 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -206,7 +206,7 @@ class Field(object):
if callable(self.default):
return self.default()
return self.default
- if not self.empty_strings_allowed or self.null:
+ if not self.empty_strings_allowed or (self.null and settings.DATABASE_ENGINE != 'oracle'):
return None
return ""