From 7ff22ef258e464b44cbb295738e7c0776ab7909f Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Tue, 21 Apr 2009 18:58:32 +0000 Subject: [1.0.X] Fixed #9651: fixed save_as with inline forms. Thanks, kmike and Mnewman. Backport of r10353 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10612 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/forms/models.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/forms/models.py') diff --git a/django/forms/models.py b/django/forms/models.py index 02324aade4..d2ca294cce 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -496,6 +496,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 -- cgit v1.3