summaryrefslogtreecommitdiff
path: root/django/db/models/fields/__init__.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-05 13:59:42 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-05 13:59:42 +0000
commitea100b607acbca31e813118d84c5c6c48fda1ae0 (patch)
tree958aa0628dc91f958354fb02e619a9e2799a4114 /django/db/models/fields/__init__.py
parent595e75e8dd5db5982574d5d3222054186ba190d8 (diff)
Added the small changes necessary to make creating custom model fields easier.
Also includes some tests for this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/fields/__init__.py')
-rw-r--r--django/db/models/fields/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index 20a4f11f1d..b0dd55e3b9 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -147,6 +147,8 @@ class Field(object):
# exactly which wacky database column type you want to use.
data_types = get_creation_module().DATA_TYPES
internal_type = self.get_internal_type()
+ if internal_type not in data_types:
+ return None
return data_types[internal_type] % self.__dict__
def validate_full(self, field_data, all_data):