Skip to content

Commit

Permalink
[4.1.x] Fixed E501 flake8 error.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm committed Jan 31, 2023
1 parent f586c12 commit a5a36da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django/db/models/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ def validate(self, model, instance, exclude=None, using=DEFAULT_DB_ALIAS):
# Ignore ordering.
if isinstance(expr, OrderBy):
expr = expr.expression
expressions.append(Exact(expr, expr.replace_references(replacement_map)))
expressions.append(
Exact(expr, expr.replace_references(replacement_map))
)
queryset = queryset.filter(*expressions)
model_class_pk = instance._get_pk_val(model._meta)
if not instance._state.adding and model_class_pk is not None:
Expand Down

0 comments on commit a5a36da

Please sign in to comment.