summaryrefslogtreecommitdiff
path: root/django/forms/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms/models.py')
-rw-r--r--django/forms/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index d50a4705e8..7ca1ab5f73 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -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