﻿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
10331	Using model InlineFormset created with inlineformset_factory fails with KeyError	Thomas Presthus <thomas@…>	nobody	"The following code would fail with '''KeyError''' '' 'user' '' at ''django/forms/models.py in add_fields, line 507''
{{{
from django.contrib.auth.models import User
from foo.models import InfoEntry

user = User.objects.get(pk=1)

InfoEntryFormset = inlineformset_factory(User, InfoEntry)
formset = InfoEntryFormset(instance=user)
}}}

It seems BaseInlineFormSet tries to access form.fields[self.fk.name] before it is created. 
Attached is a patch against r9885 fixing this, but should probably be better investigated."		closed	Forms	dev		invalid		thomas@…	Unreviewed	1	0	0	0	0	0
