#36076: Raise a check error if null=False and default=None
-------------------------------------+-------------------------------------
     Reporter:  Csirmaz Bendegúz     |                    Owner:  (none)
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

 I'm not sure what you mean by requiring python-level defaults? To have
 `default=None` on a non-nullable field is a misconfiguration and we can
 easily add a [https://docs.djangoproject.com/en/5.1/topics/checks/ system
 check] to `Field.check` to prevent it? I'm sorry maybe I'm missing
 something
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36076#comment:4>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701944b69bd29-0f996307-f658-4236-80c3-ab36f142c350-000000%40eu-central-1.amazonses.com.

Reply via email to