﻿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
22212	System check does incorrectly report an error for GenericTabularInline	Matthias Pronk <django@…>	nobody	"When I create a inline for a generic relation:

models.py
{{{
class ObjectImage(models.Model):
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey('content_type', 'object_id')

class BlockImages(models.Model):
    images = generic.GenericRelation(ObjectImage)
}}}

admin.py
{{{
from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline

class ObjectImageInline(GenericTabularInline):
    model = ObjectImage

class BlockImagesAdmin(admin.MoedelAdmin):
    inlines = [ObjectImageInline]

admin.site.register(BlocksImage, BlockImagesAdmin)
}}}

I get the following error message when running ./manage.py migrate:
{{{
CommandError: System check identified some issues:

ERRORS:
<class 'foo.admin.BlockImageInline'>: (admin.E202) 'foo.ObjectImage' has no ForeignKey to 'foo.BlockImages'.
}}}

Apparently, the new System Checks in Django 1.7 (1.6 does not show this problem) do not take into account Generic Relations."	Uncategorized	closed	Core (System checks)	1.7-alpha-2	Release blocker	duplicate	contenttype admin systemcheck generic		Unreviewed	0	0	0	0	0	0
