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
1 changed files with 5 additions and 1 deletions

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