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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user