﻿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
26686	django.core.checks.model_checks _check_lazy_references raises TypeError with NoneType model_key	Brett Haydon	nobody	"Steps for reproduction
Create poll app or any model
inherit model from django-model-utils model_utils.models.TimeStampedModel
./manage.py makemigrations

In the model import process (None, 'statusmodel') erroneously gets added to the django.core.registry.App._pending_operations. StatusModel is a model in model_utils.models but is not imported into the poll app.

django.core.checks.model_checks._check_lazy_references iterates over the model_key in _pending_operations but can't handle a model_key of NoneType so raises the TypeError.

Being a defaultdict _pending_operations seems the point of weakness here."	Bug	closed	Core (System checks)	1.10	Release blocker	fixed		Alex Hill	Accepted	1	0	0	0	0	0
