#20205: PositiveIntegerfield does not handle empty values well
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):
* owner: Amine Zyad => Jacob Walls
* needs_better_patch: 1 => 0
Comment:
It seems curious that under the status quo, where `empty_strings_allowed`
is False, that we would skip model validation even at the moment we are
holding an empty string (as opposed to None or any of the other values in
`empty_values`). [https://github.com/django/django/pull/14666 PR to run
model validation in this case.]
However, we could also treat as a duplicate of #22224 and add either
[Simon's friendly guardrail
https://code.djangoproject.com/ticket/22224#comment:5] for folks without a
solution for MyModel.clean() or just wontfix.
Happy to hear advice or to be nudged toward the mailing list.
--
Ticket URL: <https://code.djangoproject.com/ticket/20205#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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.1e7dbe2c2a0bf79c40e62a6332164e0b%40djangoproject.com.