#30626: InlineModelAdmin fails validation of an empty form when there are
ForeignKey and DecimalField with default="0.00".
-------------------------------+--------------------------------------
     Reporter:  dchaplinsky    |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  contrib.admin  |                  Version:  master
     Severity:  Normal         |               Resolution:  invalid
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by felixxm):

 * status:  new => closed
 * version:  2.2 => master
 * resolution:   => invalid


Comment:

 Thanks for this report, however your models configuration allows for such
 behavior. If a field has `blank=True` form validation will allow entry of
 an empty value (see
 [https://docs.djangoproject.com/en/2.2/ref/models/fields/#blank` blank
 documentation]) and `default` will not be used because value (empty) is
 provided (see
 [https://docs.djangoproject.com/en/2.2/ref/models/fields/#default default
 documentation]). In the same time you have `NOT NULL` constraint in a
 database.

 Closing per TicketClosingReasons/UseSupportChannels.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30626#comment:1>
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.26284e409e853b7edacbc8f7e15d336d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to