From 0248dfd3757e485bf80dcd1befb90e7a283fbb7f Mon Sep 17 00:00:00 2001 From: Boulder Sprinters Date: Tue, 5 Jun 2007 01:05:44 +0000 Subject: [PATCH] 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 --- 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 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 ""