mirror of
https://github.com/django/django.git
synced 2025-10-05 00:00:37 +00:00
Fixed #927 -- Non-integer primary keys save() method now works
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4aedb7386a
commit
36f1aef5ff
1 changed files with 5 additions and 5 deletions
|
@ -722,7 +722,7 @@ class ForeignKey(Field):
|
||||||
if value == '' or value == None:
|
if value == '' or value == None:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return int(value)
|
return self.rel.get_related_field().get_db_prep_save(value)
|
||||||
|
|
||||||
def flatten_data(self, follow, obj = None):
|
def flatten_data(self, follow, obj = None):
|
||||||
if not obj:
|
if not obj:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue