diff options
| author | David Smith <smithdc@gmail.com> | 2020-07-24 07:25:47 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-07-30 10:58:59 +0200 |
| commit | e74b3d724e5ddfef96d1d66bd1c58e7aae26fc85 (patch) | |
| tree | e478c6d04bbd8b8e1059d67e4e34e61a7666cc58 /django/db/models/fields/related_lookups.py | |
| parent | 1173db4a16bb2938ba62a6cd50372a76a7f9e05f (diff) | |
Bumped minimum isort version to 5.1.0.
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
Diffstat (limited to 'django/db/models/fields/related_lookups.py')
| -rw-r--r-- | django/db/models/fields/related_lookups.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/db/models/fields/related_lookups.py b/django/db/models/fields/related_lookups.py index c20e220141..d745ecd5f9 100644 --- a/django/db/models/fields/related_lookups.py +++ b/django/db/models/fields/related_lookups.py @@ -64,7 +64,9 @@ class RelatedIn(In): # For multicolumn lookups we need to build a multicolumn where clause. # This clause is either a SubqueryConstraint (for values that need to be compiled to # SQL) or an OR-combined list of (col1 = val1 AND col2 = val2 AND ...) clauses. - from django.db.models.sql.where import WhereNode, SubqueryConstraint, AND, OR + from django.db.models.sql.where import ( + AND, OR, SubqueryConstraint, WhereNode, + ) root_constraint = WhereNode(connector=OR) if self.rhs_is_direct_value(): @@ -120,7 +122,7 @@ class RelatedLookupMixin: if isinstance(self.lhs, MultiColSource): assert self.rhs_is_direct_value() self.rhs = get_normalized_value(self.rhs, self.lhs) - from django.db.models.sql.where import WhereNode, AND + from django.db.models.sql.where import AND, WhereNode root_constraint = WhereNode() for target, source, val in zip(self.lhs.targets, self.lhs.sources, self.rhs): lookup_class = target.get_lookup(self.lookup_name) |
