mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[4.1.x] Fixed #33996 -- Fixed CheckConstraint validation on NULL values.
Bug in667105877e. Thanks James Beith for the report. Backport ofe14d08cd89from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
148d60de74
commit
be5e3b46f7
@@ -146,9 +146,7 @@ class SchemaTests(PostgreSQLTestCase):
|
||||
check=Q(ints__startswith__gte=0),
|
||||
name="ints_positive_range",
|
||||
)
|
||||
msg = f"Constraint “{constraint.name}” is violated."
|
||||
with self.assertRaisesMessage(ValidationError, msg):
|
||||
constraint.validate(RangesModel, RangesModel())
|
||||
constraint.validate(RangesModel, RangesModel())
|
||||
|
||||
def test_opclass(self):
|
||||
constraint = UniqueConstraint(
|
||||
|
||||
Reference in New Issue
Block a user