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
|
@ -722,7 +722,7 @@ class ForeignKey(Field):
|
|||
if value == '' or value == None:
|
||||
return None
|
||||
else:
|
||||
return int(value)
|
||||
return self.rel.get_related_field().get_db_prep_save(value)
|
||||
|
||||
def flatten_data(self, follow, obj = None):
|
||||
if not obj:
|
||||
|
|
Loading…
Reference in New Issue