1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

Fixed #9651: fixed save_as with inline forms. Thanks, kmike and Mnewman.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2009-04-02 00:01:15 +00:00
parent 64e82fb648
commit 8f7aa84def
3 changed files with 60 additions and 39 deletions

View File

@@ -530,6 +530,9 @@ class BaseInlineFormSet(BaseModelFormSet):
# Remove the primary key from the form's data, we are only
# creating new instances
form.data[form.add_prefix(self._pk_field.name)] = None
# Remove the foreign key from the form's data
form.data[form.add_prefix(self.fk.name)] = None
return form
#@classmethod