#25417: Add a system check for an invalid default on a model field
-------------------------------------+-------------------------------------
     Reporter:  avorio               |                    Owner:  charettes
         Type:  New feature          |                   Status:  closed
    Component:  Core (System         |                  Version:  master
  checks)                            |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  decimal,             |             Triage Stage:  Ready for
  InvalidOperation, migrations       |  checkin
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by andialbrecht):

 Just FTR, I'm not totally sure if this is a valid use case, but for me
 this check (as published in Django 1.9 Beta 1) resulted in an error when
 running "manage.py check" or "manage.py migrate" on an empty database,
 when a model A defines a ForeignKey field to model B where the default is
 a certain value from the model B table. As in Django 1.9b1 the check tried
 to fetch the model B object from the still empty database, resulting in a
 "table does not exist" error.

--
Ticket URL: <https://code.djangoproject.com/ticket/25417#comment:24>
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/064.c294d664a3d378a04a02f37b5e1cc2ea%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to