Permalink
Browse files

Fixed #13516 -- Added an internal type definition for AutoFields, so …

…that subclassed fields are handled correctly by the SQL generator. Thanks to manfre for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 72dc12e commit 244e7b9334beb6d61814b849445a128aa0ce3c9e @freakboy3742 freakboy3742 committed Aug 7, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 django/db/models/fields/__init__.py
@@ -459,6 +459,9 @@ def __init__(self, *args, **kwargs):
kwargs['blank'] = True
Field.__init__(self, *args, **kwargs)
+ def get_internal_type(self):
+ return "AutoField"
+
def to_python(self, value):
if value is None:
return value

0 comments on commit 244e7b9

Please sign in to comment.