﻿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
25723	Related field checks should use their model's apps to lookup related models	Simon Charette	nobody	"Related model fields are using the global apps registry to determine whether or not their related model is registered (`to`, `through`).

This prevents the creation of checks tests that define model using an isolated `Apps()` instance.

e.g.

{{{#!python
isolated_apps = Apps()

class Foo(models.Model):
    class Meta:
        apps = isolated_apps

class Bar(models.Model):
    foo = models.ForeignKey(Foo)

    class Meta:
        apps = isolated_apps

# The following assertion will fail since the `to` check
# will detect a `fields.E300` issue.
asset Bar._meta.get_field('foo').check() == []
}}}"	Bug	closed	Core (System checks)	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
