1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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):