Commit e990a2cb authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.2.X] Fixed #13516 -- Added an internal type definition for AutoFields, so...

[1.2.X] 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.

Backport of r13540 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 8b70c75e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -459,6 +459,9 @@ class AutoField(Field):
        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