From daf7d482dbaaa2604241a994c49f442fa15142c1 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Mon, 26 Feb 2024 00:14:26 -0500 Subject: Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition. Once the deprecation period ends CheckConstraint.check() can become the documented method that performs system checks for BaseConstraint subclasses. --- tests/validation/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/validation') diff --git a/tests/validation/models.py b/tests/validation/models.py index 612a8dd63a..f6b1e0cd62 100644 --- a/tests/validation/models.py +++ b/tests/validation/models.py @@ -173,7 +173,7 @@ class Product(models.Model): } constraints = [ models.CheckConstraint( - check=models.Q(price__gt=models.F("discounted_price")), + condition=models.Q(price__gt=models.F("discounted_price")), name="price_gt_discounted_price_validation", ), ] -- cgit v1.3