Skip to content

Commit

Permalink
Refs #35234 -- Skipped CheckConstraint system checks if not supported.
Browse files Browse the repository at this point in the history
Thanks Tim Graham for the report.

Regression in 0fb104d.
  • Loading branch information
felixxm committed Mar 30, 2024
1 parent 0df5209 commit 425b260
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django/db/models/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ def _check(self, model, connection):
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):
Expand Down

0 comments on commit 425b260

Please sign in to comment.