summaryrefslogtreecommitdiff
path: root/tests/validation
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2024-02-26 00:14:26 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2024-03-01 07:15:32 +0100
commitdaf7d482dbaaa2604241a994c49f442fa15142c1 (patch)
tree65eae557dbe8694e03130cc17259a792792c95b7 /tests/validation
parentf82c67aa217c8dd4320ef697b04a6da1681aa799 (diff)
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.
Diffstat (limited to 'tests/validation')
-rw-r--r--tests/validation/models.py2
1 files changed, 1 insertions, 1 deletions
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",
),
]