diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2009-04-21 18:58:32 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2009-04-21 18:58:32 +0000 |
| commit | 7ff22ef258e464b44cbb295738e7c0776ab7909f (patch) | |
| tree | c1229675f64a559001820873db0a2534744a6dd6 /django/forms/models.py | |
| parent | 0d17a5c7c654c1c46390c092f7898a068cf475e2 (diff) | |
[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
Diffstat (limited to 'django/forms/models.py')
| -rw-r--r-- | django/forms/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
