summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-09-15 08:37:46 -0400
committerTim Graham <timograham@gmail.com>2017-09-15 08:37:46 -0400
commitcb362a6750f421cc7ad7fabcd261da98de1cfcda (patch)
tree237ae5c1c66d76bd95cfc5240f3a635854a876c9 /django/db/models/sql
parent1dafd8cb0b306053ac0ee868c717deeb778124f3 (diff)
Removed unnecessary check in SQLCompiler.get_related_selections().
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 37f5cce37a..01c303eb7e 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -740,7 +740,7 @@ class SQLCompiler:
return chain(direct_choices, reverse_choices)
related_klass_infos = []
- if not restricted and self.query.max_depth and cur_depth > self.query.max_depth:
+ if not restricted and cur_depth > self.query.max_depth:
# We've recursed far enough; bail out.
return related_klass_infos