﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28159	Using InlineFormset.save_as_new crashes in Django 1.11	Alexander Kavanaugh	nobody	"Django 1.11 marks multipart POST data as immutable: 4a246a02bdcbc13b15480c014f51cb0682af7c1e (#17235) . This causes an issue with the private `save_as_new` feature in InlineFormsets: the set code in the conditional block in [https://github.com/django/django/blob/05098fa4494e66e1d3750d7f4821f7b3114693b9/django/forms/models.py#L886 BaseInlineFormSet._construct_form()] now raises `AttributeError` because the data it's attempting to change is marked as immutable.

To restore previous behavior, [https://github.com/django/django/pull/8448 this pull request] turns off the immutability flag on the form data while the save_as_new functionality runs and turns immutability back on when the mutation code is complete.

Note that the mutable flag isn't set if there is no data, hence the `hasattr` code.
"	Bug	new	Forms	1.11	Release blocker		inlineformset,save_as_new		Accepted	1	0	1	0	0	0
