#37057: UniqueConstraint incorrectly raises ValidationError on nullable fields
in
condition
-------------------------------------+-------------------------------------
Reporter: Drews | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: UniqueConstraint | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):
* stage: Unreviewed => Accepted
* version: 6.0 => 5.2
Comment:
Thanks, reproduced at a77be30a4346d111beaf366dcee4934734458a48. We seem to
have an issue with NULL handling in `UniqueConstraint.validate()` where
despite `nulls_distinct=None`, we still don't want `NULL = rhs` to
evaluate to `NULL` and cause the check's `COALESCE` to return true.
--
Ticket URL: <https://code.djangoproject.com/ticket/37057#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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019db578a80d-c611dd8b-0d69-489c-91c7-32acbe89df04-000000%40eu-central-1.amazonses.com.