﻿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
21332	BaseInlineFormSet.add_fields adds multiple InlineForeignKeyFields	Raumkraut	nobody	"When a formset object has its forms iterated over, the `_construct_form(...)` method calls `self.add_fields(...)` against each form in the set.

However, for a `BaseInlineFormSet`, the add_fields implementation creates an `InlineForeignKeyField`, and appends it to `form._meta.fields`. It does this for each form, and since `form._meta` is a class attribute, it ends up with multiple duplicate InlineForeignKeyField instances.

This doesn't appear to be normally evidenced in any usual output, since all the generated FK fields have the same name, so overwrite each other in name-keyed dictionaries of the fields.

Tested on the latest stable/1.6.x branch"	Cleanup/optimization	closed	Forms	1.6-beta-1	Normal	fixed			Ready for checkin	1	0	0	0	0	0
