mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
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.
This commit is contained in:
committed by
Mariusz Felisiak
parent
f82c67aa21
commit
daf7d482db
@@ -270,7 +270,7 @@ class OperationTests(OperationTestCase):
|
||||
Neighborhood = self.current_state.apps.get_model("gis", "Neighborhood")
|
||||
poly = Polygon(((0, 0), (0, 1), (1, 1), (1, 0), (0, 0)))
|
||||
constraint = models.CheckConstraint(
|
||||
check=models.Q(geom=poly),
|
||||
condition=models.Q(geom=poly),
|
||||
name="geom_within_constraint",
|
||||
)
|
||||
Neighborhood._meta.constraints = [constraint]
|
||||
|
||||
Reference in New Issue
Block a user