﻿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
24867	admin.E202 seems to include superclass references?	TorstenRottmann	nobody	"I have this three models defined:

{{{
class Act(models.Model):
    ....

class Form(Act):
    ...

class Diagnosis(Act):
    form = models.ForeignKey(Form)

}}}

...and this admin.py:
{{{
class DiagnosisInline(admin.TabularInline):
    model = Diagnosis
    ...

class FormAdmin(admin.ModelAdmin):
    ....
    inlines = [DiagnosisInline]

admin.site.register(Form, FormAdmin)
}}}

This triggers 'admin.E202':
{{{
<class 'nm.admin.DiagnosisInline'>: (admin.E202) 'nm.Diagnosis' has more than one ForeignKey to 'nm.Form'
}}}

Without looking into the source for this system check, I guess, that it counts all possible references, that lead to the admin class, the inline is included in.

And it counts two, from which one is right (Form) and one is wrong (Act), because it's already it's own superclass reference.

Am I right?

"	Bug	closed	contrib.admin	1.7	Normal	invalid	admin.E202		Unreviewed	0	0	0	0	0	0
