#22921: Model.clean_fields incorrectly skips validation for fields where null
value
is not allowed
-------------------------------------+-------------------------------------
Reporter: silveroff@… | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage:
Severity: Normal | Unreviewed
Keywords: field validation, | Needs documentation: 0
model | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by timo):
Did you try to run Django's test suite with your proposed change? I
suspect there will be failures. If you want the field to be optional, you
need to set a value before it's saved as noted in the comment: "Skip
validation for empty fields with blank=True. The developer is responsible
for making sure they have a valid value."
--
Ticket URL: <https://code.djangoproject.com/ticket/22921#comment:5>
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/077.0b94182bb92adfac7105ea2cc6f72bb4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.