﻿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
1826	Model crashes with ForeignKey('self') and a field with the same name	Stefano J. Attardi <django@…>	Adrian Holovaty	"The following model will fail on install:
{{{
#!python
class Test(models.Model):
    this = models.ForeignKey(""self"")
    test = models.TextField()
    class Admin: pass
}}}

with this message:

{{{
At least one field in Test should have core=True, because it's being edited inline by test.Test.
}}}

If you add core=True as the message suggests:

{{{
#!python
class Test(models.Model):
    this = models.ForeignKey(""self"")
    test = models.TextField(core=True)
    class Admin: pass
}}}

then the admin crashes on the add page with the following error:
{{{
Exception Type:	AttributeError
Exception Value:	'bool' object has no attribute 'get'
Exception Location:	django\db\models\related.py in get_manipulator_fields, line 112
}}}"	defect	closed	contrib.admin	dev	normal	duplicate			Unreviewed	0	0	0	0	0	0
