Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.2.X] Fixed #13516 -- Added an internal type definition for AutoFie…

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

Backport of r13540 from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e990a2cbc43e5eaa3f245cd1b6a4c6850e31f3e9 1 parent 8b70c75
@freakboy3742 freakboy3742 authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  django/db/models/fields/
3  django/db/models/fields/
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.