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
This commit is contained in:
parent
72dc12ed06
commit
244e7b9334
|
@ -459,6 +459,9 @@ class AutoField(Field):
|
||||||
kwargs['blank'] = True
|
kwargs['blank'] = True
|
||||||
Field.__init__(self, *args, **kwargs)
|
Field.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
|
def get_internal_type(self):
|
||||||
|
return "AutoField"
|
||||||
|
|
||||||
def to_python(self, value):
|
def to_python(self, value):
|
||||||
if value is None:
|
if value is None:
|
||||||
return value
|
return value
|
||||||
|
|
Loading…
Reference in New Issue