#26686: django.core.checks.model_checks _check_lazy_references raises TypeError
with NoneType model_key
--------------------------------------+--------------------
Reporter: bretth | Owner: nobody
Type: Bug | Status: new
Component: Core (System checks) | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/26686>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.c73c0bc695526fba180d4846056f63b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.