﻿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
2297	ForeignKey and *_set accessor method broke	matthewharrison@…	Adrian Holovaty	"I revved to v3278 and my app broke.  In my view I adjust some fields of the model.

My model looks something like this
{{{

class Foo(models.Model):
    name = models.CharField(maxlength=30)

class Bar(model.Model):
    foo = models.ForeignKey(Foo)
    data = models.CharField(maxlength=30)
}}}
later on I iterate over my bars and try and get my foos from them.  ie
{{{
for foo in bar.foo_set.all():
    #do something with foo
}}}

I now get an attribute error when trying to do this:
{{{
AttributeError at /fooapp/
'Bar' object has no attribute 'foo_set'
Request Method: 	GET
Request URL: 	http://localhost:8000/fooapp/
Exception Type: 	AttributeError
Exception Value: 	'Bar' object has no attribute 'foo_set' 
}}}

Just wondering if there was a change that broke then _set functionality recently

I apologize for how vague this is.  I have another model that has a foreign key and code similar to the above still works with that.  I've briefly diffed the sources didn't chance on anything that looked to cause this change....
"	defect	closed	Database layer (models, ORM)		normal	invalid	ForeignKey _set		Unreviewed	0	0	0	0	0	0
