#33996: Inconsistent behavior of CheckConstraints validation on None values.
-------------------------------------+-------------------------------------
Reporter: James Beith | Owner: David
| Sanders
Type: Bug | Status: closed
Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):
In [changeset:"61a62be313e395ce1265132bfc99f51476fb3c95" 61a62be3]:
{{{#!CommitTicketReference repository=""
revision="61a62be313e395ce1265132bfc99f51476fb3c95"
Fixed #37057 -- Adjusted UniqueConstraint handling of UNKNOWN condition.
When we adjusted UNKNOWN handling for CheckConstraint in refs #33996 we
assumed
that all usage of Q.check would benefit from this approach.
However while CHECK constraints enforcement do ignore conditions involving
NULL
that resolve to UNKNOWN it's not the case for other type of constraints
such as
UNIQUE ones.
Given how UNKNOWN should be treated depends on the callers context it
appears
that a better strategy for COALESCE wrapping is to force them to apply it
if
necessary.
Thanks Drew Shapiro for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33996#comment:10>
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/0107019db7185ae5-5d31d01a-3863-4c9d-9b6a-cd214e60fe58-000000%40eu-central-1.amazonses.com.