1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #35234 -- Skipped CheckConstraint system checks if not supported.

Thanks Tim Graham for the report.

Regression in 0fb104dda2.
This commit is contained in:
Mariusz Felisiak
2024-03-30 14:15:03 +01:00
committed by GitHub
parent 0df520979a
commit 425b26092f

View File

@@ -200,7 +200,11 @@ class CheckConstraint(BaseConstraint):
id="models.W027",
)
)
else:
elif (
connection.features.supports_table_check_constraints
or "supports_table_check_constraints"
not in model._meta.required_db_features
):
references = set()
condition = self.condition
if isinstance(condition, Q):