Fixed #33996 -- Fixed CheckConstraint validation on NULL values.

Bug in 667105877e.

Thanks James Beith for the report.
This commit is contained in:
David Sanders 2022-09-09 00:02:58 +10:00 committed by Mariusz Felisiak
parent b731e88415
commit e14d08cd89
7 changed files with 42 additions and 7 deletions

View file

@ -156,9 +156,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(