#27697: JSONField with blank=True is rendered as non-required field in a 
ModelForm
-------------------------------------+-------------------------------------
     Reporter:  aruseni              |                    Owner:  Andrew
                                     |  Nester
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.postgres     |                  Version:  1.10
     Severity:  Normal               |               Resolution:
     Keywords:  postgres             |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


Comment:

 The behavior with a field like `data = JSONField(blank=True)` still seems
 confusing. It renders "null" in an initial form but then creates a "This
 field is required." error if you try to save that. Before this PR, a value
 of `{}` could be saved with such a field, but now it gives "This field is
 required." for that input. Is this what you expected?  If so, perhaps some
 documentation clarification is in order as this doesn't seem intuitive.

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

Reply via email to